View Full Version : Aligning text and links

10-06-2007, 08:46 PM
I have the following HTML which I can't get to line up the way I have in mind. What I'd like is for there to be two lines - one with text followed by a link, and the next with just a link.

Both lines should be right-aligned within the block with class "inner".

<div class="links">
<div class="inner">
<div class="group">
Text describing link1 <a href="link1.html">Link 1</a>
<a href="link2.html">Link 2</a>

I tried setting the "links" block to float left and the "inner" block to float right, but everything just appears left aligned against the "inner" block. If float the "group" block and the second <a> to the right, then it gets misaligned.

I've tried multiple combinations of markup but nothing seems to work. Is the design the way I described above possible?


10-07-2007, 12:20 AM
Spans, paragraphs and floats work.


<div style="float:left; width: 400px; ">
<p style = "float:right">
text, text, text here
<img blah />
<a blah>what eve rwh ateve rwh ateve rwhat ever</a>
<span style="float:right; clear:both;"><img blah2 /></span>

Try it... :)