Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE8 not rendering borders

I made a simple test page.

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Test</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>

    <div id='test'>
        BORDER TEST!
    </div>

</body>
</html>

CSS:

body,
html{
    margin:0;
    padding:0;
}
div#test{
    border:1px solid #bbb;
    height:200px;
    width:500px;
    margin:10px auto;
}

This doesn't work. And I've got this problem all over a site that I'm currently developing. Borders not rendering properly or simply just not showing up at all. This is happening on IE8, by the way.

A point in the right direction would be really nice.

PS: I've tried changing doctypes, but on my site other DTDs still don't fix the problem and, in fact, causes more.

like image 947
rgin Avatar asked Feb 23 '26 00:02

rgin


1 Answers

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

change your doctype to above one. i have verified with IE 7 To IE 9. So definately This will help you. :)

like image 83
Pradip R. Avatar answered Feb 24 '26 13:02

Pradip R.