0

Im working on a signin form.I have given all properties by testin it on googlechrome.After completing the form I checked it in mozilla.the dimensions I have specified are completely changed especially height.Can I know the reason behind this. here is my code

input
{
  padding: 13px 14%;
 }
#email-wrapper #email-label
{  
  border: 1px solid #e5d4c2;
border-radius: 3px 0 0 3px;
border-right: 1px solid #FFF;
display: inline-block;
height: 39px;
line-height: 36px;
vertical-align: middle;
margin-right: 0;
width: 36px;
}

    #email-wrapper #email-label label 
{
  background: url("~/application/modules/User/externals/images/mail.png") no-repeat              scroll 19px 13px #FFFFFF;
       background-size: 15px 15px;   
    }
#email-wrapper #email-label label
{
 color:transparent;
   }
3
  • Can you be a bit more specific as to what exactly is going wrong in mozilla? Commented Jan 24, 2014 at 6:18
  • the height of input elements change a bit inthe sense nearly 2 to 3pixels.If I changed it for firefox then chrome was disturbing Commented Jan 24, 2014 at 6:26
  • can you please post your html code too.. Commented Jan 24, 2014 at 6:37

2 Answers 2

2

Please Use this CSS and Cross Browser :

input{
    padding: 13px 14%;
}

#email-wrapper #email-label{

    border: 1px solid #e5d4c2;
    -webkit-border-radius: 3px 0 0 3px;
       -moz-border-radius: 3px 0 0 3px; 
         -o-border-radius: 3px 0 0 3px; 
        -ms-border-radius: 3px 0 0 3px;
            border-radius: 3px 0 0 3px;
    border-right: 1px solid #FFF;
    display: inline-block;
    height: 39px;
    line-height: 36px;
    vertical-align: middle;
    margin-right: 0;
    width: 36px;
}

#email-wrapper #email-label label {
    background-image: url("~/application/modules/User/externals/images/mail.png") 
    background-repeat:no-repeat;
    background-color:#FFFFFF;
    background-position:19px 13px;
    background-size: 15px 15px;   
}
#email-wrapper #email-label label{
    color:transparent;
}
Sign up to request clarification or add additional context in comments.

1 Comment

I second that it would most likely be a cross browser issue, nothing like trying to develop something as simple as a web page but having to have 4 times the code/handlers.
1

After watching the CSS Code My assumption is that input field height is different on both browser.. by giving the style to input field your problem should solve..

you need to add these property in your input field..

input
{
  padding: 13px 14%;
  border:1px solid #666;
  border-radius:5px;
 }

I hope this will work for you.

Regards,

2 Comments

thanx for the suggestion you have given .But the problem is by giving percentage in padding
ideally you should use %, or px or em values... please don't use a combination.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.