Jump to content

Archived

This topic is now archived and is closed to further replies.

TGIF

How to align words in the same table cell?

Recommended Posts

I dont' know too much about CSS. Just wonder how to define style sheet class to align several words on the left and several words on the right in the same table cell?

Another question is: what is the child node of table element?

Thanks a lot!

Share this post


Link to post
Share on other sites
float: left; and width: widthpx; for the left element, and the rest will fall into place. As for the child node of a table element, I dunno. <tr> maybe?

Share this post


Link to post
Share on other sites
Or you can use text-align:right and left
<tr> is the child node of a <table>, and <td> is the child node of a <tr>

Share this post


Link to post
Share on other sites
child node for the table is <tbody><thead> and <tfoot> if you want to add elements using JavaScript.

Share this post


Link to post
Share on other sites
[quote author=Ifa link=topic=102289.msg406520#msg406520 date=1154359837]
Or you can use text-align:right and left
[/quote]
I don't think that's what he's after. I think that he means blocks of text, like on Wikipedia. Besides, that won't let them stack next to one another, they'll just go one on one line, and one on the other.

Share this post


Link to post
Share on other sites
use <span> <p> <font> and there are many more tags
just use a class. like: <span class="right"> and such

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.