View Full Version : Please Help!! - problem centering a div in IE 5.0
erotavlas
05-26-2003, 04:09 AM
Hi,
Can anyone with IE version 5.0 check out my site at
http://michelangelo.ca
A friend viewed it and said the div block is shifted to the left and is not in the position it should be (i.e. centered with the layout table)
I am not sure how to fix this
I tried putting a <center> tag around the whole <div> and used align="center" but they say it still doesn't work!!
Does anyone have any ideas???
Thanks in advance for any help with this!! :)
Sal
zoobie
05-26-2003, 04:45 AM
What div?
erotavlas
05-26-2003, 05:02 AM
SOrry,
should have been more specific...
If you go to the Menu or Wine pages you will see it....there is a scrolling div container that stays to the left while the layout table is centered.
Sal
zoobie
05-26-2003, 07:25 AM
Dunno...I went to the wine page but there's so much goofy code bloat on it, all I saw was a 2 div's towards the bottom of the page.
Surely you could make a cleaner page than that...The scrolling menu with the wine on it is really unnecessary, looks bad, bloats the code, and is unstyled to boot.
Anyway, have you tried "text-align:center" or "margin:auto" somewhere in your style? :D
ronaldb66
05-26-2003, 10:01 AM
As Zoobie - surprisingly! - pointed out correctly: for all browsers that do implement CSS correctly, setting an element's width at some value and setting margin-left and margin-right to auto should work; for IE (that doesn't), add text-align: center to the containing element and reset it to the desired alignment on the centered element.
erotavlas
05-26-2003, 03:42 PM
Ok I put in text-align: center
on menu/appetizers.html and wine/redwine.html
Can someone let me know if this makes a difference?
Zoobie, can you offer some suggestions on 'unbloating' my code. I take it you meant that there were unnecessary code in some pages. Is this right?
This is actually the first website I ever made, so please feel free to help me out with some more suggestions!
Thanks :)
Sal
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.