Welcome to WebmasterWorld Guest from 50.19.34.234

Forum Moderators: not2easy

Message Too Old, No Replies

CSS and absolute positioning?

     

BootySlap

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

10+ Year Member



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!?

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

BootySlap

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

10+ Year Member



Okay i have an image in a div with this class

.nav{
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?

Birdman

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

WebmasterWorld Senior Member 10+ Year Member



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.

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You might also want to add display:block

gph

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

10+ Year Member



Have you tried a strict doctype?

BootySlap

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

10+ Year Member



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

BootySlap

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

10+ Year Member



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.

BootySlap

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

10+ Year Member



PROBLEM SOLVED thanks :))
 

Featured Threads

Hot Threads This Week

Hot Threads This Month