Log in

View Full Version : css ie6 fix



why not
09-25-2008, 10:20 PM
hi ! this code worked with firefox ! opera ! but bad work in ie6 -

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test</title>
</head>
<body >
<div align="center">
<div style="width:100%; height:10px; background-color:#000099;"></div>
</div>
</body>
</html>
NOTE Error in IE6 : height Div over 10px ! and space div with top is long - how to fix ?
SORRY For Bad English Grammer

Freshpeel
09-26-2008, 07:46 PM
One solution is to create a separate css file for ie6 only. Adjust the css so that the site works right in ie6 and then link to it like this:


<!--[if lte IE 6]>
<link rel="stylesheet" href="styles/ie.css" type="text/css" media="screen" />
<![endif]-->