FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Wtf, right align. Why won't you work?

 


zanzou
So, there I am, poking at my webpage, and I deside: Hey! I can link to the next page in the list at the top of the page, and make things easier for all!

And so I try p align. I try div align. I try everything I can get my hands on that should make stuff align.

But when I post text, the stuff I align to the right will drop down to the next line.

Anybody know how to fix that so that I can have a line that's aligned both to the left AND right, by my definitions?
Esch
Can you perhaps link to an example of this behavior?

You may also consider experimenting with 'float', e.g.:

Code:
<p>

<!-- here's that floating div i promised -->
<div style="float: right; border: solid 1px black; padding: 5px; width: 100px;">hello there</div>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel enim eu lorem malesuada cursus. Maecenas mollis luctus purus. Cras fermentum purus eget mi. Sed augue lectus, imperdiet in, cursus vel, pretium mattis, eros. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Sed malesuada. Etiam sed dui...</p>


Note that the div will place itself 'inline' with the paragraph text, just 'floated' to the right.

Accompanying, modified example: http://somnolence.ath.cx:81/temp/float.html
yjwong
If possible, you can use tables to separate both contents at each side. Hope it helps.
zanzou
I ended up using tables, but I'm going to try a few other ways (I'm not too fond of tables).

What I'm going to try next:

<div style="width: 100%;"> <span style="float: right;"> Bit on the right </span> Bit of text on the left <br clear="all" /></div>
ock1991
i'm typing off my imagination, but you could try :

Code:
<span style='width : 50%; text-align : left'>Things on the left</span><span style='width:50%; text-align : right'>Things on the right</span>


P and DIV makes a line break before it renders in IE.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.