Display Inline-block Forced Padding

Posted by topdog 825 days ago Questions| padding html forced All
Why are padding pixels placed between divs that use display inline-block? If I use float:left then they are flush together, otherwise they are given a forced padding (4 pixels on my system).

Thanx,

I have put this up on http://localhost/tmp.php

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8559-1">
</head>
<body">
<style type="text/css">
.testItem {
display:inline-block;
width:50px;
padding:0px;
margin:0px;
background-color:red;
}
</style>
<div class="testItem">test</div>
<div class="testItem">test</div>
</body>
</html>
Discuss Bury


Who Voted for this Question