Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- left-right-center aligned
March 10, 2005, 11:45 am
rate this thread
Is it possible to have each column cell in a table to be left-aligned
with each other, but also right-aligned with the cell based on the
So a table like...
...could be output like...
[[ aaa ][bbb ]]
[[ aaaaaa][bbb ]]
[[ aaaaa ][bbb ]]
|___Right align as a group
to the center of the table
...at the moment, the closest I have is right-aligning the TD, and in
that, having a left-aligned SPAN where I set the em width manually -
but as the page is generated dynamically, I can only really guess what
Thank you for any help,
Re: left-right-center aligned
Hi Els, thank you for the response.
Sorry, I should also have mentioned in my previous post that my
table width was 100% and columns were 50% each
I tried playing around with different ideas based on your reply, and
the best I came up with this (below) - are there better ways? I don't
know how to make something small enough to fit the largest content -
how's it done? - or was that response based on the fact that I'm an
idiot and forgot to mention the width of my table/cells?
<table style="width: 100%;">
<td width="1px"><div style="white-space: nowrap;">abc def</div></td>
<td width="1px"><div style="white-space: nowrap;">a b c</div></td>
Thank you for your help :)