Column Widths in Table

admin

Administrator
Staff member
Hello-<br />
I'm having difficulty with the column widths in my table.<br />
<br />
Specifically, I have a simple two-column table but even though I have the table centered (align="center"), the table columns (and the data within them) appears too far to the left.<br />
<br />
I have experimented with changing the width dimensions and that helps some, but the table data still appears too far to the left.<br />
<br />
Does anyone have any suggestions for how to adjust the width of the columns so that they appear centered in the page?<br />
<br />
Thanks.<!--content-->You could try using padding:<br />
<br />
<br />
<td style="padding:1em;"><br />
<br />
<br />
Which would add 1em's worth of padding to all sides of the cell.<!--content-->Originally posted by Waves <br />
Does anyone have any suggestions for how to adjust the width of the columns so that they appear centered in the page?<br />
<br />
<br />
Do you have a link to the page so we can give usable suggestions? :)<br />
<br />
In general though, I'm hoping that you are using <table> to create a Table, not general page layout.<br />
For layout you should use CSS.<!--content-->are you using <td align="center"><tr align="center"> of just <center> or div. Im not sure how much of a diffence make inbetween these methods but if you were just to say <table align="center"> It would put the table in the center of the page. Also if you look on the barbaric software site in my signiture The info that is at the bottum of the page off my main table is aligned to center or your screen when you first see the page not the actual center of the page because when you use the horizontal scroll it can exily become not so centerd. Ok I might Im starting to even confuse myself all I am trying to say is it really matters where you put the center.<br />
You can always throw some random &NBSP; 's in ur code<!--content-->Simple or not tables are ficklers for aligning.<br />
There a many tricks out there to assist with aligning tables but if al comes down to browser of the user in the end. <br />
<br />
<table width=640 cellpadding=0 cellspacing=0 border=0 bgcolor=mistyblue align=center> <br />
<tr><br />
<td width=320 align=center><br />
data data data data data <br />
</td><br />
<td width=320 align=center><br />
data data data data <br />
</td><br />
</tr></table><br />
<br />
I hope that helps you a little:)<!--content-->
 
Back
Top