Forum Moderators: not2easy

Message Too Old, No Replies

CSS hack for adjusting top position

css hack top mac

         

onesmalldaz

4:03 am on Apr 28, 2004 (gmt 0)

10+ Year Member



I have a problem at the moment where a div's top is differnt on different browsers..

I have found one hack that works for mozilla and ie

But i need one that works for ie o5 on a mac as well..

so far i use

top:99px;_top:105px;

So the "top" works with mozilla and then "_top" works on IE PC browsers.

But it seems that i need IE on a mac to use 99px as well.

how can i do this?

Bonusbana

8:50 am on Apr 28, 2004 (gmt 0)

SuzyUK

7:43 am on Apr 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you could use 1 x hack for all..


top:99px;_top:105px;
So the "top" works with mozilla and then "_top" works on IE PC browsers.
But it seems that i need IE on a mac to use 99px as well.

So you only want IE/Win to see the 105px..


#yourdiv {top: 99px;}

/* hide from Mac\*/
* html #yourdiv {top: 105px;}
/* end hide */

The backslash (red) in the first comment escapes the first closing */ according to Mac so it thinks the whole rule is a comment and it doesn't close it until the last */

other browsers will see the bit in bold and then because only IE understands the * html bit only IE/Win will read it..

Suzy