Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
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
Old 06-14-2014, 04:09 PM   #2
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
What are the actual results you get?
I would suspect the right-align to apply to the location of the span element and the left-align to apply within it.
So:
PHP Code:
                             HURRAY HURRAY AGAIN 
DomesticExtremis is offline   Reply With Quote
Advert
Old 06-14-2014, 04:24 PM   #3
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
Exactly what you posted, but I needed to use float instead of text-align... that's a result of working all day long :/

Thanks anyway.
odedta is offline   Reply With Quote
Old 06-15-2014, 06:06 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by odedta View Post
Exactly what you posted, but I needed to use float instead of text-align... that's a result of working all day long :/
It is always best to leave up the original question + any solutions you may have come across.

It helps anyone who might stumble across the same problem in the future, or lurkers who are too afraid to post (but DO read/absorb a lot of information from the forums).
Tex2002ans is offline   Reply With Quote
Old 06-15-2014, 05:07 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,550
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I agree with Tex2002ans. Please do put back the original question along with the solution for anyone else who may have the same problem.
JSWolf is online now   Reply With Quote
Advert
Old 06-16-2014, 05:09 AM   #6
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
Oh, the question was so silly I was embarassed about leaving it there, alright hehe
odedta is offline   Reply With Quote
Old 06-16-2014, 09:40 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
This question also reminds me of a semi-related ADE "bug" I ran across with floating something left/right on the same line:

https://www.mobileread.com/forums/sho...d.php?t=210804

Quote:
Originally Posted by odedta View Post
Oh, the question was so silly I was embarassed about leaving it there, alright hehe
Bah, we all have to start learning somewhere!

Even the best of us sometimes stumble across something that is baffling, even though the solution is obvious to some others.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text still full justifying on iPad, even through style says align left SamL ePub 13 04-20-2017 10:24 PM
Center align text in epub virtual_ink ePub 23 08-31-2011 06:27 AM
need help on how to align a table to the right NASCARaddicted ePub 6 02-18-2011 01:46 PM
I can not align the text...help please! XD derfel_spain ePub 17 12-18-2010 09:45 AM
Justify align in RTF? griffbrad Sony Reader 6 11-27-2006 03:25 PM


All times are GMT -4. The time now is 03:47 PM.


MobileRead.com is a privately owned, operated and funded community.