text in one line - How To Avoid TABLE tag and use CSS ?

This is a discussion on "text in one line - How To Avoid TABLE tag and use CSS ?" within the Web Page Design section. This forum, and the thread "text in one line - How To Avoid TABLE tag and use CSS ? are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Jan 16th, 2006, 08:51
New Member
Join Date: Jan 2006
Age: 30
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
text in one line - How To Avoid TABLE tag and use CSS ?

Hi,
Could you give me an advice in a short example, of course if it is possible, to write in one line text1 alignment to the left and text2 to the right? I'd like to avoid table tag and replace the code (example):
HTML: Select all
<table width="200">
<tr>
<td align="left">text1</td>
<td align="right">text2</td>
</tr>
</table>
Thanks,
pugo

Last edited by pugo; Jan 16th, 2006 at 08:53.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 16th, 2006, 16:10
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Re: text in one line - How To Avoid TABLE tag and use CSS ?

HTML: Select all
<div style="width:200px;">
<div style="width:100px;float:left;text-align:left;">
text1
</div>
<div style="width:100px;float:right;text-align:right;">
text2
</div>
*should* work, havent tested it tho...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 16th, 2006, 19:40
New Member
Join Date: Jan 2006
Age: 30
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: text in one line - How To Avoid TABLE tag and use CSS ?

It works well. Thank you very much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 16th, 2006, 21:24
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: text in one line - How To Avoid TABLE tag and use CSS ?

Just clear whatever goes below those bits of code, because when an element is floated, it is removed from the flow of the document.

Like this:
...the above code goes here...
<div style="clear:both">
This is all things below in the document.
</div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 18th, 2006, 04:14
Reputable Member
Join Date: Jul 2005
Location: Indiana, USA
Age: 29
Posts: 153
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: text in one line - How To Avoid TABLE tag and use CSS ?

herk is right, make sure you clear it (otherwise it'll cause you fits later on).

Sometimes those clears sneak up on you.
Last Blog Entry: Whats in a name? (Feb 20th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
text, line, avoid, table, tag, use, css

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Have a major problem with Text Line-Height vidoewebmastery Web Page Design 2 Mar 24th, 2008 20:15
Randomly generated one line text filling out the width of a div? brynjarh Web Page Design 3 Mar 12th, 2008 03:39
Line not wrapping in table Marc Web Page Design 10 Apr 14th, 2007 11:30
scroll does not line up text and background cherishkiss Web Page Design 2 Feb 22nd, 2007 15:40
Text Alignment on second line of Bullet point adeking Web Page Design 2 Jul 31st, 2006 20:38


All times are GMT. The time now is 09:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42