[thelist] centre a div in a browser window

Erik Mattheis gozz at gozz.com
Sat Jun 3 02:14:21 CDT 2006


On Jun 3, 2006, at 12:57 AM, Birdie wrote:
> I am trying to move away from tables and getting stuck at some  
> pretty easy
> first hurdles.
>
> When I used to use tables I could give the outside table the  
> property centre
> to make it position its self in the centre of a persons open  
> browser window.
> And then all other content would then be contained in the table and  
> would
> all stay centre.
>
> How do I do that with a div tag?

<div style="margin:auto">

> And even if I did do that, say I need one
> big border round the whole page, how do I make the other div tags stay
> within the containing div tag with the border applied ?
>
> Does that make sense ?

Not sure I understand ... are you using css positioning  
(position:fixed)?



More information about the thelist mailing list