开发者

Firefox ignoring padding

I have this CSS code:

   #tweet-container{
width: 290px; 
height: 272px; 
border: 1px solid #CCC; 
color: #CCC; 
font-size: 28px; 
text-align: center;
开发者_开发百科letter-spacing: -2px; 
min-height: 10px; 
display: table-cell; 
vertical-align: middle; 
padding: 15px;
}

But firefox doesn't seem to recognize the top and bottom padding. Safari and Chrome both show it normally, and even in Firebug when I add padding-top: it doesn't work. Its like its not a valid statement or something. Is there something I'm missing?


Humm, this is a bit interesting. You've set the width as 272px, but its actually displayed as 270px. You've set the height as 290px, with the 30px total of padding, the real displayed height should be 320px, but its actually 318px.

Had a little play and taking out display: table-cell; seems to sort the issue. Although the padding isn't spread equally for some reaosn, it all appears at the bottom. Putting the text in a p tag, and giving that a 15px top margin has done the job though I think.


did you try adding padding:15px!important; ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜