SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with floats and text wrap

    Hi there,

    I'm having some trouble with text wrapping around floated elements and I'm not really sure how to resolve it. Basically, I have a "side menu" on the left of my site that is basically just a floated div. On the right of the that is the main content area, which is in a seperate div.

    Basically, the text in the main content area is wrapping around the side menu, which I don't want it to do. The side menu is only a few hundred pixels high but I don't want anything to wrap underneath it.

    Just as an example so you understand:

    EDIT. Bloody hell that diagram messed up. Basically:

    Side Text goes
    Menu around here

    then under here


    However, in IE, it doesn't do this. Problem is, if I use margin, it looks fine in Firefox and Opera but it messes it up in IE.

    Can anyone help?

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to apply a left margin to the main content container that is equal to the width of the side menu.

  3. #3
    SitePoint Guru DCS's Avatar
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your side menu containing div inside the main content div? It needs to be outside of it.


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
  •