IE 7 ul in floating div

Hi guys,

Recently i have encountered a problem in IE7 when i put a ul in a floating div, for some reason the ul slides out of the div and it doesn’t look good at all.

The Solution for the ul in floating div:

Just add in your header a new stylesheet witch will load with IE 7 like this:

<!–[if IE 7]>
<link rel=”stylesheet” href=”css/ie7style.css” media=”screen”>
<![endif]–>
This way when ie7 loads the page it loads this stylesheet along and all you need to do is add the needed css rules to fix this problem without changing the look in the other browsers.
If some of your styles are written inline and you need to override it all you have to do is add within your new specific style the expression !important like this
#floatingDiv {margin:10px 0 15px 5px !important;}
When you will add this code to your newly created css, it will effect the specific element only in IE7
Thank you for reading this post, and feel free to post comments.
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
You can skip to the end and leave a response. Pinging is currently not allowed.

3 Responses to “IE 7 ul in floating div”

  1. Samantha says:

    thanks for posting the solution for the ul in floating div– i encountered the same problem too and i found this site ! thanks!

  2. Tim says:

    I’ve got a floating div with a list in it, but I think I’ve run into a fairly unique issue with IE, or so it would seem.

    I’m trying to debug the list for IE7 using the Developer Tool in IE8. The page is rendered in IE7 standards mode, but the developer tool is seeing my closing tag as being written .

    I’ve never seen this happen, and it certainly isn’t happening in other browsers. But in IE7 it’s definitely jacked. Even in IE8 everything is fine.

    Ever run into anything like this?

    -Tim

  3. leonzinger says:

    Hey Tim,

    Thanks for your comment.

    Can you give me the url of your website so i will check it out?

    Leon

Leave a Reply