MidnightMermaid Posted September 17, 2008 Share Posted September 17, 2008 I made an image a div layer and I wanted to absolute position it. The code I used was:<IMG STYLE="position:absolute; TOP:322px; LEFT:96px; WIDTH:810px; HEIGHT:510px" SRC="MY IMAGE URL">It looks great in IE, but it's off in Firefox. I used the code validator and it's coming up as right, but what code can I use so it looks the same in both?Thanks,Kristen Link to comment Share on other sites More sharing options...
jeffman Posted September 17, 2008 Share Posted September 17, 2008 In what way is it "off"? If you want it to line up with something that's NOT absolutely positioned, you should expect trouble.If it's a pixel or two off and the items in question have borders and you're not using a strict DTD, well, that's the old box-model problem. Link to comment Share on other sites More sharing options...
jlhaslip Posted September 18, 2008 Share Posted September 18, 2008 Can you submit a link to the page, please.Position Absolute can be tricky. It needs to be contained inside a Div using position Relative or it gets Borked... Link to comment Share on other sites More sharing options...
rzea Posted September 19, 2008 Share Posted September 19, 2008 Browsers render margins, paddings and spaces somewhat different.I'm with Deirdre's Dad as well: what's "off"? How?If your image is not inside any other container, just plainly put in the HTML right after the <body> tag, then here you go: body { margin:0; padding:0;} Link to comment Share on other sites More sharing options...
MidnightMermaid Posted September 20, 2008 Author Share Posted September 20, 2008 Here is the link to the site...the main content in Firefox is not positioned like in IE, it's not lining up correctly.http://www.freewebs.com/sweetneographics/index.htm Link to comment Share on other sites More sharing options...
jeffman Posted September 20, 2008 Share Posted September 20, 2008 It's just like I said. Your top image is positioned using the <center> tag, but your bottom image is positioned using absolute coordinates. The chances of them matching consistently are ridiculous. Just changing the size of your window in IE should mess up the alignment. In short: you need to use the same method to position these images.Learning more about the correct way to layout an HTML document is a good idea too. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.