TGIF Posted July 30, 2006 Share Posted July 30, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/ Share on other sites More sharing options...
pixy Posted July 30, 2006 Share Posted July 30, 2006 Why not just use <div align="left"> for the stuff you want on the left, and <div align="right"> for stuff on the right? Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-65703 Share on other sites More sharing options...
TGIF Posted July 30, 2006 Author Share Posted July 30, 2006 I tried. It didn't work.[quote author=pixy link=topic=102290.msg405723#msg405723 date=1154230527]Why not just use <div align="left"> for the stuff you want on the left, and <div align="right"> for stuff on the right?[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-65707 Share on other sites More sharing options...
pixy Posted July 30, 2006 Share Posted July 30, 2006 How on earth does it NOT work?<table><tr><td><div align="left">This text is on the left...</div><br><div align="right">This text is on the right...</div></td></tr></table>I know that that works. Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-66082 Share on other sites More sharing options...
akitchin Posted July 30, 2006 Share Posted July 30, 2006 i think what he wants is for them to be on the same line.to do this, you'd need to enable a float on one of the elements:[code]<table style="width: 500px;"> <tr> <td style="text-align: left;"> <div style="float: right;">Sample text on the right.</div> Some text on the left. </td> </tr></table>[/code]as expected, the stuff in the DIV will float to the right of the regular content. be sure to place floated elements BEFORE the content you wish to float it next to, otherwise it will have no effect. for more info on floating/positioning, see:[url=http://css.maxdesign.com.au/floatutorial/index.htm]http://css.maxdesign.com.au/floatutorial/index.htm[/url] Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-66126 Share on other sites More sharing options...
Unholy Prayer Posted August 3, 2006 Share Posted August 3, 2006 or you could use this:[code]<table><tr><td>stuff</td><td>other stuff</td></tr></table>[/code]That should do the trick. Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-68420 Share on other sites More sharing options...
ober Posted August 3, 2006 Share Posted August 3, 2006 Please use an appropriate board next time! Quote Link to comment https://forums.phpfreaks.com/topic/15989-how-to-align-words-in-the-same-table-cell/#findComment-68502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.