Horizontal Spacing

Discussion in 'HTML' started by mcp6453, Jan 23, 2006.

  1. mcp6453

    mcp6453 Guest

    Here's an easy one. I want a picture flush on the left margin of a page
    with text aligned on the right side of the picture. The code
    align="left" border="0" allows me to do that, but the text is too close
    to the picture. I added hspace="5", but that obviously applies space to
    both sides of the picture. Is there a way to add space to the right side
    only?
     
    mcp6453, Jan 23, 2006
    #1
    1. Advertising

  2. mcp6453

    Els Guest

    mcp6453 wrote:

    > Here's an easy one. I want a picture flush on the left margin of a page
    > with text aligned on the right side of the picture. The code
    > align="left" border="0" allows me to do that, but the text is too close
    > to the picture. I added hspace="5", but that obviously applies space to
    > both sides of the picture. Is there a way to add space to the right side
    > only?


    Use CSS:
    img.foo{
    float:left;
    margin-right:5px;
    }
    HTML:
    <img class="foo" src="..." alt="..."><p>bla bla bla</p>


    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Dr. Feelgood - She Does It Right
     
    Els, Jan 23, 2006
    #2
    1. Advertising

  3. mcp6453

    mcp6453 Guest

    Els wrote:
    > mcp6453 wrote:
    >
    >
    >>Here's an easy one. I want a picture flush on the left margin of a page
    >>with text aligned on the right side of the picture. The code
    >>align="left" border="0" allows me to do that, but the text is too close
    >>to the picture. I added hspace="5", but that obviously applies space to
    >>both sides of the picture. Is there a way to add space to the right side
    >>only?

    >
    >
    > Use CSS:
    > img.foo{
    > float:left;
    > margin-right:5px;
    > }
    > HTML:
    > <img class="foo" src="..." alt="..."><p>bla bla bla</p>
    >
    >


    I don't have access to the css file. Can I use inline css? The site is a
    blog that accepts HTML.
     
    mcp6453, Jan 24, 2006
    #3
  4. mcp6453

    Mark Parnell Guest

    Deciding to do something for the good of humanity, mcp6453
    <> declared in alt.html:

    > I don't have access to the css file. Can I use inline css?


    I don't see why not.

    <img style="float:left; width:100px; margin-right:5px;" src="..."
    alt="..."><p>bla bla bla</p>

    Replace the width above with the actual width of the image.

    --
    Mark Parnell
    =====================================================
    Att. Google Groups users - this is your last warning:
    http://www.safalra.com/special/googlegroupsreply/
     
    Mark Parnell, Jan 24, 2006
    #4
  5. mcp6453

    mcp6453 Guest

    Mark Parnell wrote:
    > Deciding to do something for the good of humanity, mcp6453
    > <> declared in alt.html:
    >
    >
    >>I don't have access to the css file. Can I use inline css?

    >
    >
    > I don't see why not.
    >
    > <img style="float:left; width:100px; margin-right:5px;" src="..."
    > alt="..."><p>bla bla bla</p>
    >
    > Replace the width above with the actual width of the image.
    >


    It works perfectly. Thanks!
     
    mcp6453, Jan 24, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Craig Deelsnyder [MVP]

    Re: Spacing radio buttons in a PlaceHolder

    Craig Deelsnyder [MVP], Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    Craig Deelsnyder [MVP]
    Jul 15, 2003
  2. Stephan Bour

    Row spacing in DataList

    Stephan Bour, Dec 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    582
    Stephan Bour
    Dec 8, 2003
  3. jch
    Replies:
    7
    Views:
    3,643
  4. Stijn Goris

    can't remove horizontal spacing

    Stijn Goris, Sep 15, 2004, in forum: HTML
    Replies:
    1
    Views:
    814
    Hans Nieser
    Sep 16, 2004
  5. quantass
    Replies:
    1
    Views:
    1,215
    Patrick.O.Ige
    Jan 21, 2007
Loading...

Share This Page