January 13, 201016 yr I having some problems with loosing margins in ie both times it after a list that I've used block and float left I cant see what causing it ? Its probably something simple lol In ie7 on this one I loose the margin between the footer and pictures and in ie8 on this one I loose the margin between the top navbar and my name<h1> I fixed this by adding into my clear div but on ie7 theres a gap under the footer aaargh lol tia Jack
January 13, 201016 yr Author I think I've fixed the 2nd one now added to my clear {line-height: 0xp; font-size: 0px; border: none;} hope thats done the trick can anyone test it for me thanks
January 14, 201016 yr Author Ok both fixed hopefully Lee how do you use a seperate style sheet for ie ?
January 14, 201016 yr Like this <!--[if IE 6]> <link rel="stylesheet" type="text/css" href="css/iestyle.css" /> <![endif]-->
January 14, 201016 yr When you float an element (or multiple elements) without clearing the space, you will lose margin, and your background wont wrap around the elements. To avoid this, I always do this: <div id="element-with-background-containing-floating-elements"> <div class="float-left"></div> <div class="float-left"></div> <div class="clearfix"></div> </div> My CSS for the clearfix is this: .clearfix{ display: block; clear: both; } That does the trick every time. +1 me if I helped!
Create an account or sign in to comment