homepage Welcome to WebmasterWorld Guest from 54.227.215.139
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Centering a table within a DIV
ryan_b83

5+ Year Member



 
Msg#: 3241873 posted 6:10 pm on Feb 3, 2007 (gmt 0)

I have a div that spans the width of a page and a small table within it, for some reason I am haivng trouble centering the table within this space.

What is the proper method to accomplish this? Intenet Explorer seems to react differently than other browsers..

Thank You,

 

cmarshall

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3241873 posted 6:18 pm on Feb 3, 2007 (gmt 0)

Here's how I do it:

<div style="width:100%;text-align:center">
<table cellpadding="0" cellspacing="0" style="margin-left:auto;margin-right:auto;text-align:left">
<tr>
<td>A Table Cell</td>
</tr>
</table>
</div>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved