I'm having trouble with div
height and width in IE.
On my web page, http://www.ricominciodame.it/eventi.php, there are some div
s with a blackboard style.
In Firefox, they all work fine, but in IE (both 7 and 8) the width is lower and the background is cut.
The following is my CSS:
div.evento {
background : white url("images/sfondo_evento.png") top no-repeat;
width : 260px;
height : 207px;
margin:5px;
margin-left:0px;
margin-bottom : 20px;
padding-left : 20px;
padding-right : 20px;
padding-top : 20px;
padding-bottom : 20px;
color : white;
}
How can I fix this problem?
Your page is running in ie quirks mode caused by the DOCTYPE
. You have to use any of these http://www.w3.org/QA/2002/04/valid-dtd-list.html
Also, it's good to validate always your web site, from w3 validator.
Is your doctype set to put the browser in standards mode? For example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With