Jump to content


Photo

How to align words in the same table cell?


  • Please log in to reply
5 replies to this topic

#1 TGIF

TGIF
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 30 July 2006 - 03:17 AM

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!


#2 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 30 July 2006 - 12:21 PM

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?
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#3 Ifa

Ifa
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts
  • LocationRauma, Finland

Posted 31 July 2006 - 03:30 PM

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>
I'm just a guy who likes to code for fun...

#4 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 31 July 2006 - 04:56 PM

child node for the table is <tbody><thead> and <tfoot> if you want to add elements using JavaScript.

NoGray.com


#5 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 31 July 2006 - 05:39 PM

Or you can use text-align:right and left

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.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#6 silentwf

silentwf
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 05 August 2006 - 01:19 PM

use <span> <p> <font> and there are many more tags
just use a class. like: <span class="right"> and such




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users