style="float: "

Discussion in 'HTML' started by gerrymcc@indigo.ie, Dec 31, 2003.

  1. Guest

    I don't really understand the 'box model' yet. I know that each
    element has a containing box, which may itself be contained in an
    ancestor element's box. I believe that these boxes can be made to
    'float' so that following elements flow around them. Suppose that I
    have something like:

    <img src="anImage.gif" style="float:left">
    <p> some text that goes to the right of the image, but not below it
    <p>
    <hr>

    Here I want the horizontal rule to go below the gif and the text, but
    instead it may go below the text and to the right of the image. Is
    there a way for me to ensure that the <hr> (or anything else I
    specify) goes below the image?

    Thanks,
    Gerard
    , Dec 31, 2003
    #1
    1. Advertising

  2. Jay Guest

    <> wrote in message
    news:XpGIb.2693$...

    <snip>

    > Suppose that I have something like:
    >
    > <img src="anImage.gif" style="float:left">
    > <p> some text that goes to the right of the image, but not below it
    > <p>
    > <hr>
    >
    > Here I want the horizontal rule to go below the gif and the text, but
    > instead it may go below the text and to the right of the image. Is
    > there a way for me to ensure that the <hr> (or anything else I
    > specify) goes below the image?


    <div>
    <img src="anImage.gif" alt="An Image" style="float: left">
    some text that goes to the right of the image, but not below it
    </div>
    <br clear="left">
    <hr>

    There may be a better way though...

    - J
    Jay, Dec 31, 2003
    #2
    1. Advertising

  3. wrote:
    > <img src="anImage.gif" style="float:left">
    > <p> some text that goes to the right of the image, but not below it
    > <p>
    > <hr>
    >
    > Here I want the horizontal rule to go below the gif and the text, but
    > instead it may go below the text and to the right of the image. Is
    > there a way for me to ensure that the <hr> (or anything else I
    > specify) goes below the image?


    In your CSS:

    hr {
    clear : left;
    }
    Leif K-Brooks, Dec 31, 2003
    #3
  4. brucie Guest

    in post <news:XpGIb.2693$>
    said:


    > <img src="anImage.gif" style="float:left">
    > <p> some text that goes to the right of the image, but not below it
    > <p>
    > <hr>
    >
    > Here I want the horizontal rule to go below the gif and the text


    <p><img ... style="float:left">text text text</p>
    <hr style="clear:left;">



    --
    brucie
    01/January/2004 08:27:56 am kilo
    brucie, Dec 31, 2003
    #4
    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. Andy
    Replies:
    7
    Views:
    6,256
    Roedy Green
    May 10, 2004
  2. Jim West
    Replies:
    4
    Views:
    1,434
    Jeff Schwab
    Jan 16, 2004
  3. bd
    Replies:
    0
    Views:
    624
  4. Carsten Fuchs
    Replies:
    45
    Views:
    1,540
    James Kanze
    Oct 8, 2009
  5. Ken Varn
    Replies:
    0
    Views:
    450
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page