user1556451
user1556451

Reputation: 11

Internet Explorer renders element’s width incorrectly

I hope that this is just a bad dream, but when I measure the width of both element in Photoshop, I get an incorrect size.

    <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>

<style>* { margin: 0; padding: 0; border: 0: border-collapse:collapse;}</style

</head>



<body>

  <table width="129" border="0" cellpadding="0" cellspacing="0" style="width:129px; height:18px;background-color:black;">
    <tr>
        <td>&nbsp;</td>
    </tr>
</table>
Renders above table as 134 pixels

<br/>

<div style="width:29px;height:18px;background-color:Black;"></div>
    ​
Renders above div as 30 pixels
</body>
</html>

Upvotes: 0

Views: 119

Answers (1)

djinn
djinn

Reputation: 26

Is your browser zoom level 100%? Tested with IE7/8/9 the measurements match to 129px and 29px but zoomed in one level (105%) they become as you mentioned 134px and 30px.

Upvotes: 1

Related Questions