homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS and absolute positioning?

 7:15 am on Mar 27, 2003 (gmt 0)

Is there any method or hack for getting around the fact that using absolute positioning gives different alignments (usually a few pixels) in opera, IE and netscape!?



 7:24 am on Mar 27, 2003 (gmt 0)

What do you mean by "different alignment"?
I haven't experienced any problems...

Well, unless you're talking about NN4 that is ;)


 8:20 am on Mar 27, 2003 (gmt 0)

Okay i have an image in a div with this class

height: 465px;
width: 130px;
position: absolute;
float: left;

this is basically aligned next to another div on the screen. in opera they are both perfectly aligned (i.e equal in height).

in IE the image (or div, not sure) is a bit shorter and also in NN (latest browser versions).

Any idea how I can fix it or still want more information?


 11:49 am on Mar 27, 2003 (gmt 0)

You might want to set the padding and margin on on the parent div if you haven't already. Also, when you use absolute positioning, you need to set the top and/or left position. You don't have that in your code now. You probably don't need to use absolute position. Try taking it out and set your margins instead.


 10:14 pm on Mar 27, 2003 (gmt 0)

You might also want to add display:block


 10:42 pm on Mar 27, 2003 (gmt 0)

Have you tried a strict doctype?


 3:52 am on Mar 28, 2003 (gmt 0)

Thanks for the hints I will give it a go soon and get back to you!


 5:28 am on Mar 28, 2003 (gmt 0)

Hmm I have tried putting top, left, padding and margin in numerous places without prevail. And also display: block doesnt do anything.

It still does the same thing with the image without its own div (just in the parent div).

Is there any way I can get a diagram in here so i can show u more clearly cuz i know we cant link images.


 5:37 am on Mar 28, 2003 (gmt 0)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved