| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
div
|
Suggested CSS fix?
Here we go again.... Basically I have a fixed with div with a 780px width. Inside this div I want to have 3 nested divs, lined up horizontally. The way I've done it (as per sitepoint) is to float one div left, one right, and add left/right margins to the center one to position the content. You can see the finshed result here; http://www.coolpink.net/projects/help/ Now it works in everything I think, apart from ie5.01 (see attached image) I'm trying to convince the people at work to use css, but it doesn`t help when I cant fix things like the above. Can anyone help? Also, is there another way of doing the whole layout apart from the one I've used above? Any help appreciated |
|
|
|
|
|
#2 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,933
|
Rule #1: ALWAYS use a full DTD (preferably a 'Strict' one.) The reasons 'why' have been mentioned here many times* before. (* most of them by me, probably) It may not fix the problem itself, but it will make solving the problem more straight-forward. |
|
|
|
#11 (permalink) |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,200
|
It's not the problem here but don't use position:relative and floats together - causes bugs. your problem is because of the box model hack. IE5.0 ignores any rule immediately following the hack, so you have to add some unecessary rule there to avoid losing your necessary rules. some people simply add something like #a{ } after each use of the hack, this will allow IE5.0 to "recover" and the following declaration will be read correctly. It's better all round though to add the "be nice to Opera" rule afterwards instead. Details of that are on Tantek's explanation of the BMH. That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
![]() |