开发者

Pixel size for different browsers

Is the pixel size different for different browsers?

For example

<input type='bu开发者_运维知识库tton' class='button2' value='...' />

/*****CSS*****/
.button2{
     width:120px;
}

overflows the button value in Chrome but doesn't so in Safari and Firefox. What am I doing is wrong?


Pixels should be the same. If you investigate, you may find that the different browsers have different default values for things like margins, padding, text size, font face, etc. That's probably what's tripping you up (though I would note that popping that code into my own browsers does not produce any overflow.)


  1. use css-reset
  2. different browsers render elements differently. Look your button in IE, you will be surprised :)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜