HighDots Forums  

Image positioning in Firefox

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Image positioning in Firefox in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cate Archer
 
Posts: n/a

Default Image positioning in Firefox - 03-24-2007 , 11:57 AM







I'm trying to position images using CSS. I put inline style code in
the <img> tag. Why does this line of code work in IE7 but not in
Firefox 2.0? Anybody got a better way?

<img height="160" width="160" style="position=relative; top=20;
left=20;" src="images/bomb.jpg">

Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: Image positioning in Firefox - 03-24-2007 , 12:08 PM






Cate Archer wrote:

Quote:
I'm trying to position images using CSS. I put inline style code in
the <img> tag. Why does this line of code work in IE7 but not in
Firefox 2.0? Anybody got a better way?

img height="160" width="160" style="position=relative; top=20;
left=20;" src="images/bomb.jpg"
Try replacing the '=' inside the style attribute with ':'.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


Reply With Quote
  #3  
Old   
Cate Archer
 
Posts: n/a

Default Re: Image positioning in Firefox - 03-24-2007 , 01:17 PM



On Sat, 24 Mar 2007 17:08:13 +0100, Els <els.aNOSPAM (AT) tiscali (DOT) nl>
wrote:

Quote:
Try replacing the '=' inside the style attribute with ':'.
That worked. Thanks.


Reply With Quote
  #4  
Old   
Els
 
Posts: n/a

Default Re: Image positioning in Firefox - 03-24-2007 , 01:30 PM



Bergamot wrote:

Quote:
"top=20" is invalid for another reason than the one Els mentioned.
Non-zero values require a unit - em, %, px, etc.
Yup, missed that one :\

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


Reply With Quote
  #5  
Old   
Bergamot
 
Posts: n/a

Default Re: Image positioning in Firefox - 03-24-2007 , 02:14 PM



Cate Archer wrote:
Quote:
I'm trying to position images using CSS. I put inline style code in
the <img> tag. Why does this line of code work in IE7 but not in
Firefox 2.0? Anybody got a better way?

img height="160" width="160" style="position=relative; top=20;
left=20;" src="images/bomb.jpg"
"top=20" is invalid for another reason than the one Els mentioned.
Non-zero values require a unit - em, %, px, etc.

I question whether the code you are attempting is really what you
*should* be doing, though. Do you know what relative positioning
actually does?

I bet it "works" (sort of) in IE because you are triggering quirks mode.
How about showing us a URL so we can advise you on the best way to get
what you are really trying to achieve?

--
Berg


Reply With Quote
  #6  
Old   
Gérard Talbot
 
Posts: n/a

Default Re: Image positioning in Firefox - 03-24-2007 , 05:52 PM



Cate Archer a écrit :
Quote:
On Sat, 24 Mar 2007 17:08:13 +0100, Els <els.aNOSPAM (AT) tiscali (DOT) nl
wrote:

Try replacing the '=' inside the style attribute with ':'.

That worked. Thanks.
Cate, please bookmark this page:

Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages

That webpage answers the most frequent problems when trying to support
all modern browsers.

Gérard


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.