SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: text alignment

  1. #1
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text alignment

    I have an image which is set to align="left" so the text wraps around it. I want a simple strap line under the image say 'for illustration purposes only'.

    How can I do this eg put the image and the strap line in a table and wrap the text around that (that doesn't work!)? Do I need to use css?

    monkey
    monkey - the rest is history

  2. #2
    SitePoint Enthusiast trigxine's Avatar
    Join Date
    Jul 2004
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you dump everything inside a div, it should all work out. In your stylesheet, just give that div the properties of float: [something]. You can really only have the image and its text on one side or the other of the page using that.... so it'd come out to --
    HTML Code:
    <p>text text text text text text text
    <div id="whatever">
    <img ... />
    <p>caption</p>
    </div>
    text text text</p>
     
    and then in CSS:
    #whatever {
    float: right;
    width: [x]px;
    height: [x]px;
    }

  3. #3
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or if you want to use a table, here's a simple example:

    Code:
     <table>
     <tr>
     	<td><img src="Logos2.jpg" align="left">text here<br><br><br><br><br>
     	<p>illustration purposes</p>
     	</td>
     </tr>
     </table>
    Just use breaks in this instance to create the affect (might be another way, but I'm in a hurry)

    Or use a float as mentioned above, although, I prefer the CSS method myself, looks cleaner.
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •