Why does my text do this?

Discussion in 'CSS' started by brandonvd, Aug 26, 2008.

  1. #1
    I am in the process of designing a site for my mother-in-law and a group that she is in and I need some help figuring out why my text is doing what it is doing.

    The site is http://www.mccapc.org

    For some reason the last line of text is wrapping under an image. I like how it looks, but for the life of my I can't figure out why it is happening or how to change it.

    Here is a pic of what I mean:

    [​IMG]

    If anyone can take a look and help me out I would really appreciate it.

    Brandon
     
    brandonvd, Aug 26, 2008 IP
  2. ozan

    ozan Peon

    Messages:
    82
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is how float is intended to work. When the content of the outer div extends below the height of the inner (floated) div, it will wrap underneath. In this case it looks a bit weird since the text below is aligned to the center, but really it's behaving as expected.

    By the way the <div id='family2'><p><img... markup is redundant. You can just use the image, and apply float to that.
     
    ozan, Aug 26, 2008 IP
  3. brandonvd

    brandonvd Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    O.K. I get it.

    I played around with the family2 height and saw what difference it makes when I changed the value.

    I also removed the <p> tag. I thought I didn't need the tag, but I put it there anyways when I messing around with the layout and just forgot to remove it.

    Thank you for your help,

    Brandon
     
    brandonvd, Aug 26, 2008 IP