...

View Full Version : HTML input button padding issue



sidhu688
11-15-2012, 07:51 PM
I have this below input button HTML.The issue is that when i go to developer tools and say change the text in the input button the padding increases by itself in IE9 .I tested the same in chrome and the padding stays the same over there .Also i ran the above code in w3schools site in IE 9 and there also the padding stays the same after changing the text inside .Can someone please give me some direction.

<html>
<head>
<title>
my page
</title>

</head>

<body>

<input type="button" id="btn1" value="test" />

</body>
</html>

Excavator
11-15-2012, 08:05 PM
Hello sidhu688,
Is that your entire code? Whenever IE renders things differently from a good browser, like FF, I always suspect a missing DocType.
See the link about DocTypes in my signature line.

See if this helps -
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<input type="button" id="btn1" value="test test test" />
<input type="button" id="btn1" value="test" />
</body>
</html>

sidhu688
11-15-2012, 08:14 PM
That worked just fine for me..thank you so much



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum