internet explorer 8 - Css problem with IE/FF compatibility -


I have some CSS that does not deal correctly with IE8. It works fine with FF3, but IE8 has white boxes in between the list items and the whole thing is small.

The question here is CSS

  #golist {width: 900px; Margin Top: 20px; Margin-Correct: Auto; Margin-left: auto; } # Listings {list-style: none; Margin: 0; Padding: 0; } #listing li {float: left; Display area; Width: 128px; Background: #fff; Limit: 1px solid # 000000; Height: 96px; } #listing li a {border: none; } #listing p {margin-bottom: 0; } / * ---- Show-hidden element ---- * / #listing li .show {display: block; Width: 128px; Height: 96px; } #listing li .hide {color: # 121212; Align text: left; Height: 0; Hidden flurry; Background image: url (bghover.png); } #listing li: Hover. Hull, #listing li.over .hide {cursor: pointer; Height: 96px; Width: 128px; Text-align: center; } #listing li: hover. Show, #listing li.over .show {height: 0; Hidden flurry; } #listing li a, #listing li a: visited, #listing li a: active {color: # 121212; Font-size: 12px; Text-decoration: none; } #listing li a: Hover {Color: # 121212; Text-decoration: none; }  

And here's the code:

  & lt; Div id = golist & gt; & Lt; Ul id = listing & gt; & Lt; Li class = show & gt; & Lt; A href = # & gt; & Lt; Img src = images / image.jpg Height = 96 px width = 128px limit = 0> & Lt; / A & gt; & Lt; Div class = hide & gt; & Lt; A href = link.html & gt; Link & lt; / A & gt; & Lt; P & gt; Some information & lt; / P & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;  

There should be a 128x96 box with an image. On mouseover, a layer pops up with some text on it.

Start by clearing all default padding and using margins in your CSS file:

  * {padding: 0; Margin: 0}  

Then you have to adjust your code accordingly because every browser connects all the padding and marginal properties.

Once you receive it, at which point you are happy with Firefox and Safari, use the conditional statement to drag it into the appropriate IE stylesheet:

  Lt ;! - [If IE 6] & gt; & Lt; Link Href = "css / cssName_IE6.css" rel = "stylesheet" type = "text / css" & gt; & Lt ;! [AndIf] - & gt; & Lt ;! - [If IE 7] & gt; & Lt; Link href = "css / cssName_IE7.css" rel = "stylesheet" type = "text / css" & gt; & Lt ;! [AndIf] - & gt; & Lt ;! - [If IE 8] & gt; & Lt; Link href = "css / cssName_IE8.css" rel = "stylesheet" type = "text / css" & gt; & Lt ;! [Endif] - & gt;  

Override only needs to be overridden in your stylesheet:

Master CSS

  .iframestyle {float: left; Margin-right: 3px; Width: 305px; }  

IE 6

  .iframestyle {width: 309px; Height: 263 px; }  

IE 7

  .iframestyle {width: 309px; Margin-top: 0 pixels; }  

IE 8

  .iframestyle {width: 305px; Margin-top: 0 pixels; }  

(For whatever reason IE 8 may require redistribution of width.)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -