Welcome to WebmasterWorld Guest from 23.20.137.66

Forum Moderators: not2easy

Message Too Old, No Replies

Centering a table within a DIV

     
6:10 pm on Feb 3, 2007 (gmt 0)

5+ Year Member



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,

6:18 pm on Feb 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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>
 

Featured Threads

Hot Threads This Week

Hot Threads This Month