Height in IE is shown in Firefox
I have a problem displaying the height of the set in ie.
In my css, I set the height for my sidescreen div to be 2150px; which it displays fine in firefox, but does not display the full height, i.e.
How can I get ie to display the height I have set, i.e.
Thanks in advance
Source code below
#sidebar_newspr{
width:160px;
min-height:2150px;
margin-top:1px; margin-right:2px;
border-right-style:solid; border-right-color:#900; border-right-width:1px;
float:left;
}
#sidebar_newspr a{
text-decoration:none;
color:#FFF;
font-size:12px; font-family:Verdana,Arial,Helvetica,sans-serif;
}
#sidebar_newspr a:hover{
color:#900;
}
a source to share
It's a bit of a shot in the dark because you didn't specify which versions of IE you are testing it for. However, min-height
requires IE7 and IE8 to run in standards mode. To enable standards mode, you need to use strict !DOCTYPE
.
From the documentation :
In Internet Explorer 7, the min-height / max-height attributes are applied to floated and absolutely positioned boxes, inline-box elements, and some inline controls. They do not apply to non-replaceable inline elements such as table columns and row / column groups. (The "replace" element has its own dimensions, such as img or textArea.)
In Internet Explorer 7, this property is only allowed under strict! DOCTYPE.
min-height
in IE6 only applies to elements th
, td
and tr
.
a source to share
Try using conditional comments:
<!--[if lt IE 9]> //will target IE less than version 9
<link href="/directroy/IE.css" rel="Stylesheet" type="text/css"/>
<![endif]-->
Into your own tag and use this new stylesheet to define what you want IE to do.
#sidebar_newspr{
width:160px;
height:2150px; /*change to just height*/
margin-top:1px; margin-right:2px;
border-right-style:solid; border-right-color:#900; border-right-width:1px;
float:left;
}
You can also use more than one conditional comment for different IE versions.
Same:
<!--[if IE 8]> //will target only IE 8
<link href="/directroy/IE.css" rel="Stylesheet" type="text/css"/>
<![endif]-->
Then try setting your doctype strictly:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Might work, if not, then I'm sure someone else has an idea :)
a source to share