Thread: text-align:lol;
View Single Post
Old 06-14-2014, 03:46 PM   #1
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
[SOLVED] text-align:lol;

Original question:

If you have 1 paragraph and you want to align 2 words one in each side as the attachment suggests, how do you do it?

I tried the following code:
Code:
<p class="align_right">HURRAY! <span class="align_left">HURRAY AGAIN!</span></p>
Code:
.align_right
{
   text-align:right;
}
.align_left
{
   text-align:left;
}
Why is this not working?

[SOLVED]
Answer: Use the float rule instead, so:
Code:
.align_right
{
   float:right;
}
.align_left
{
   float:left;
}
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	264
Size:	1.2 KB
ID:	124161  

Last edited by odedta; 06-16-2014 at 05:27 AM.
odedta is offline   Reply With Quote