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.)
- use css-reset
- different browsers render elements differently. Look your button in IE, you will be surprised :)
精彩评论