1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

padding doesn't work in INPUT box...

Discussion in 'CSS' started by MicahCarrick, Dec 9, 2005.

  1. #1
    I have an input box of type text which I need to be a fixed size (the height must not exceed 10-12px. However, when doing this, I cannot get it to render properly in firefox. Here's what I have:

    
    .fixed_input {
       border: 1px solid gray; 
       height: 10px; 
       width: 15px; 
       font-size: 10px; 
       line-height: 10px;
       font-family: verdana, arial, sans-serif; 
       text-align: center;
       vertical-align: top; 
    }
    
    Code (markup):
    In IE, Netscape, and Safari it looks fine. Firefox however, the text starts at about 5 or 6 pixels from the top border. I've tried putting in different padding-top values but padding does not seem to effect the position of the input box's value at all. Is there a way to specify this?

    Micah
     
    MicahCarrick, Dec 9, 2005 IP
  2. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Firefox stinks with css. I find it terrible. Have you tried it in Opera to see if it works?
     
    RectangleMan, Dec 9, 2005 IP
  3. MicahCarrick

    MicahCarrick Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, it looks good in Opera too. I usually have the hardest time with CSS with IE. All the other browsers including firefox usually work quite well. So yeah, only firefox is offsetting the text in the input box.

    - Micah
     
    MicahCarrick, Dec 9, 2005 IP