...

View Full Version : Aligning text and links



vk101
10-06-2007, 07: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>
</div>
<a href="link2.html">Link 2</a>
</div>
</div>

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?

Thanks.

jlhaslip
10-06-2007, 11:20 PM
Spans, paragraphs and floats work.

Untested:


<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>
</p>
<span style="float:right; clear:both;"><img blah2 /></span>
</div>

Try it... :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum