Hi, I need to get a table in the middle of a container. When I add align='center' to the table it gets centered. But how to get the same result with css? The only attribute there is text-align, which just centers the text inside the table. What's the equivalent css style for align='center'? Thanks
There is no single center align tag for css. You can do this though: body { text-align:center; } div { text-align:left; } .CenteredDiv { margin-left:auto; margin-right:auto; width:780px; } That works in all browsers.
simplier code #wrapper { margin: auto; width: whatever in pixels; } this is the wrapper that wraps everything in it just use this <div id="wrapper"> ... </div>
Read - http://www.maxdesign.com.au/presentation/center/ You also need body tag with text-align:center;
You just put the CSS tag text-align:center; Into your CSS sylesheet as per usual under your style name. Then just class your table, by using a div or including the class in your body tag or any way you want to Hope that helps! Diarmuid