Hi, how do I display a centred div, that keeps the margins in tact, similar to the page found at "yell.com"
one of div's and css's main drawback, the lack of "center" you can set your left and top to 50% on the div, and then your left and top margins to offset half the div's height and width
How does Yell.com do it?
they set body widht and height to 100 and then text-aligning things center, and verticle align middle take a look at their css http://www.yell.com/css/yell_home_001.css
What is their bear-essential code, that displays the centered white box, that everything sits on?
I wasn't even looking, and I found http://aplus.co.yu/lab/rdc/
rulian wrote:one of div's and css's main drawback, the lack of "center" you can set your left and top to 50% on the div, and then your left and top margins to offset half the div's height and width
CSS:
#example { width: 750px; margin: 0 [b][color=red]auto[/color][/b]; }
HTML
<div id="example"> <!-- page contents here --> </div>