Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS issue with IE

Tags:

css

Please check this:

http://img62.imageshack.us/img62/3598/ieff.png

why is it more height than in FF.. i want it to be like FF in IE

#message2 {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 105; 
    background-color: #034678;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 100%;
    text-align: center;
    font-weight: bold;
        border-bottom: 2px solid #FFF;
  height: 26px;
  width: 100%;
} 

<div class="message2" id="message2" onclick="closeNotice2()" style="display: none">
Yo, <b><? echo $pusername; ?></b> - <? echo $_SESSION["user_message"]; ?> 
<a class="close-notify" onclick="closeNotice2()">X</a>
</div> 

When i change the size of height, It changes in FF but in IE it remains the same size..?

like image 828
Karem Avatar asked Jan 18 '26 08:01

Karem


2 Answers

Did you try adding a line-height to your css?
Also a css reset might help with the default margin and padding.

like image 140
Knu Avatar answered Jan 20 '26 20:01

Knu


Internet Explorer has a very nasty quirks mode which activates when your web page seems to disobey the W3C standards. In quirks mode, Internet Explorer tends to render things just a (big) bit different than other browsers (to keep compatibility with older websites which where written specifically for Internet Explorer's weird rendering engine). One way to let Internet Explorer think that your web page actually conforms to the standards is to insert a DOCTYPE as the very first line in each web page.

For an XHTML web page, the doctype could be:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

For a HTML 4.0 web page, it could be:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
like image 42
Daniel A.A. Pelsmaeker Avatar answered Jan 20 '26 21:01

Daniel A.A. Pelsmaeker