Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding Left quirk in Firefox

Tags:

html

css

firefox

http://jsfiddle.net/hERrX/

input{
    padding:1%;
}
input#checking{
    padding-left:40px;
}

Please Check the above link in FIREFOX and help me with the problem. It seems to work quite well in Chrome. The padding-left doesn't seem to work even though it has higher priority.

like image 420
shahalpk Avatar asked Jul 30 '11 15:07

shahalpk


2 Answers

It works if you don't use a % length:

http://jsfiddle.net/hERrX/15/

input{
    padding: 5px;
}
input#checking{
    padding-left: 40px
}

I don't know why it doesn't work with %..

I found an existing bug report here: https://bugzilla.mozilla.org/show_bug.cgi?id=527459

like image 193
thirtydot Avatar answered Sep 21 '22 11:09

thirtydot


This looks similar to question #1446832, Firefox seems to not work too well with percentage paddings.

The generic padding: 1% is conflicting with the specific left-padding padding-left: 40px. In jsfiddle.net I fixed it by replacing the latter with padding: 0 0 0 40px.

like image 33
Jorrit Schippers Avatar answered Sep 19 '22 11:09

Jorrit Schippers