The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do I allign text on the same line?

View previous topic View next topic Go down

How do I allign text on the same line?

Post by Guest on September 1st 2010, 4:41 am

I want to align one portion of text on the left and another portion of text on the right, all on the same line. What HTML codes can I use to do this? I tried this code here:

Code:
<div style="text-align:left"><b>Text Left Side</b><div style="text-align:right"><b>Text Right Side</b>

But this code doesnt keep the text on the same line. It 'line breaks' once the second code to align left starts..

Can anybody please help me align text on the right and on the left but on the same line?

Guest
Guest


Back to top Go down

Re: How do I allign text on the same line?

Post by Guest on September 1st 2010, 5:50 am

This should work:

Code:
<div style="float:right;text-align:right;"><b>Text Right Side</b></div><div><b>Text Left Side</b></div>

Guest
Guest


Back to top Go down

Re: How do I allign text on the same line?

Post by Guest on September 1st 2010, 6:44 am

Thanks Dion, that worked, is there any way i can make them more spaced apart?

Guest
Guest


Back to top Go down

Re: How do I allign text on the same line?

Post by ankillien on September 1st 2010, 8:05 am

@SPADEZ wrote:Thanks Dion, that worked, is there any way i can make them more spaced apart?

Try adding this to the code...

<div style="float:right;text-align:left;"><b>Text Right Side</b></div><div style="margin-right : 200px;><b>Text Left Side</b></div>

Change 200px as per your need.

ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

http://www.webartzforum.com/

Back to top Go down

Re: How do I allign text on the same line?

Post by Guest on September 1st 2010, 6:20 pm

@ankillien wrote:
@SPADEZ wrote:Thanks Dion, that worked, is there any way i can make them more spaced apart?

Try adding this to the code...

Text Right Side
margin-right : 200px;>Text Left Side

Change 200px as per your need.

Hmm, thats odd, i tried that and it seems to remove my left side text but keep the link, however the link becomes so wide it takes up the entire line or a good portion of it, i tried various sizes but my left side text never displayed with this code.

Check out my forum @ www.The-EN.com and look at the chatbox iframe. Where it says "Please View The-EN Chatbox Rules: Click Here!" thats what i am trying to move to the left side of the iframe.

Guest
Guest


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum