一个简单的button样式问题,在线等...
<!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>
<title></title>
<style type="text/css">
.divstyle
{
border-style:solid;
border-width:1px;
border-color:Black;
}
.btnstyle
{
margin-top:0px;
margin-bottom:0px;
}
</style>
</head>
<body>
<div class="divstyle"><input class="btnstyle" type="button" value="hello" /></div>
</body>
</html>
我想问的是这种写法只有在ie里button才能上下碰着div的边框,在opera,chrome,firefox里都不行
我想问在其他3种浏览器里,要怎么写才能让button上下碰着边框
------解决方案--------------------
<!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>
<title></title>
<style type="text/css">
* {margin:0; padding:0;} .divstyle
{
border-style:solid;
border-width:1px;
border-color:Black;
}
.btnstyle
{
margin-top:0px;
margin-bottom:0px;
}
</style>
</head>
<body>
<div class="divstyle"><input class="btnstyle" type="button" value="hello" /></div>
</body>
</html>