|
|
 |
Re: FN-FORUM: CSS positioning / hacks
date posted 9th August 2007 10:58
On 9 Aug 2007, at 11:14, Ali Walker wrote:
>
>
> Hi,
> I've been lurking for a long time now, and have suddenly hit a
> pain of a problem with my CSS - I've tried Googling for hacks for it,
> but had managed to avoid hacks in the past and am getting REALLY
> confused about what I need to do, especially as some of the hacks
> don't
> now work on IE7. Can anyone help?
>
> I have an image at the top of my site (www.gbktest.co.uk/vobiz)
> which is rendering in the right place on my Mac (Safari & Firefox),
> but just ain't working in IE7 for PC - seems to work ok for Firefox on
> PC though. The rule I have is:
>
> img#sticker {position:absolute;margin-left:550px;margin-top:-60px;}
>
> It really confused me that I'd have to use a negative margin in the
> first place with Firefox on the Mac - any
> ideas on how I can get it into the right place for IE as most of
> our users are going to be IE/PC based!
try position:relative on the element that contains img#sticker.
that will make your absolute position relative to that element.
and it's not margins that you use for absolute position - just top,
left, etc.
what you seem to have is an image positioned in relation to body, 0 0
which means you've used -ve margins to move it down and across as the
0 0 is the center of the image
try top:x left x and see what happens.
hth a bit, not got time to look properly...
|
 |
|