1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

adding text next to image ...how?

Discussion in 'General Programming Chat' started by halifax123, Jan 11, 2009.

  1. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    Hey guys...

    I'm using dreamweaver but for that matter could be any editor I suppose...

    I never could figure a way to do it?

    Example let's say I have an img gif icon 100 X 100, with a link to what ever site the img is from, or sending the link to where ever I need,

    is it possible to place text next to it ?

    l this is where
    l I am trying
    l to type the text,
    l but can't
    l seem to do it, but this bottom line has no problem (it's the 4 lines above)

    the 5 vertical lines are representing the equivalent of the vertical side of the img gif of about 100 pixs in height,

    that bottom line on the lowest line of whatever size the img happens to be, always displays no problem, but it's the area above that I am unable to get text to display?

    I'm sure this is "html 101" but I'm just not understanding...

    any help would be appreciated!

    (hope that made sense!)
     
  2. PureCarnage

    PureCarnage Newbie

    Joined:
    Jan 8, 2009
    Messages:
    5
    Likes Received:
    0
    Occupation:
    Software Developer.
    Location:
    Earth
    Home Page:
    You can do it two ways, wrap the image in a table or use divs.

    Code:
    <table>
    <tr>
    <td> <img src="img.jpg"> </td>
    <td> My text blah...</td>
    </tr>
    </table>
    
    Or use divs.
    
    <div id="image_wrapper">
    <div id="image" style="float:left"> <img src="img.jpg"> </div>
    <div id="text">My text blah... </div>
    </div>
     
  3. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    thanks carnage I'll give her a spin
     
  4. enigman

    enigman Newbie

    Joined:
    Nov 26, 2008
    Messages:
    20
    Likes Received:
    5
    Not sure about the previous response because I'm not much of a code guy, but as a fellow Dreamwe4ver user...
    The way I get around this is by putting the img and the text in separate layers. You can then put them where you want. Going a step further you can then convert the layers to tables which are more widely supported. I only add this last bit because I ran into the problem of egay not supporting layers in auctions when I was doing that... hope this helped.
     
  5. jonshannow

    jonshannow Junior Member

    Joined:
    Jul 25, 2008
    Messages:
    128
    Likes Received:
    87
    Occupation:
    full time online business
    Location:
    Melbourne, Australia
    Div's are far the best way. Tables for layout are outdated and impossible to edit once the site is done Try to use your css for all layout.