Question:

Having problems lining up html images and text?

by  |  earlier

0 LIKES UnLike

What I'm trying to do is create image links to use as buttons, with text to the right of them. My code works fine except for one problem: the images themselves are aligning to the right of the one above them.

To better explain the situation I threw together a little image showing what happens: http://www.deeje.net/stuff/code-prob.jpg

And here's my code:

<p><a href="http://www.blah.com/blah"><img src="http://www.blah.com/blah.png" align="left" width="120" height="120"/></a>Button text.</p>

As you can see, the buttons are 120x120 pixels. Thanks for any advice!

 Tags:

   Report

2 ANSWERS


  1. Great examples and code at:

    http://www.htmlgoodies.com/


  2. add     &lt;BR CLEAR=ALL&gt; to the end of the line

    &lt;p&gt;&lt;a href=&quot;http://www.blah.com/blah&quot;&gt;&lt;img src=&quot;http://www.blah.com/blah.png&quot; align=&quot;left&quot; width=&quot;120&quot; height=&quot;120&quot;/&gt;&lt;/a&gt;Button text.&lt;/p&gt;&lt;BR CLEAR=ALL&gt;

    for a space under each button add &lt;p&gt;&lt;/p&gt; also to the end of the line after the &lt;BR CLEAR=ALL&gt;

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.