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 a text field in Firefox vs. IE

Discussion in 'CSS' started by marklbishop, Mar 15, 2008.

  1. #1
    I'm trying to make some space in a text field and I'm using padding to do it in my css:
    
    .searchbox {
     font-size: 10px;
     border: 1px solid #ccc;
     padding: 0.7em;
     color: #999999;
    }
    Code (markup):
    It looks great in Firefox but I can't get the spacing correct in IE. It doesn't space at all. Does anyone know what I'm missing? Thanks.

    And the text page I'm using is here:
    www.healthyschoolscampaign.org/index3.php
    It's the search box in the upper right.

    Thanks again.
     
    marklbishop, Mar 15, 2008 IP
  2. mds

    mds Active Member

    Messages:
    256
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    I dont see any DOCTYPE definition on top of your page.



     
    mds, Mar 15, 2008 IP
  3. marklbishop

    marklbishop Peon

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wow. That worked. I guess I need to learn about properly using doctypes. Thanks.
     
    marklbishop, Mar 15, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Basically, no doctype sends IE into Quirks mode, which makes it act like IE5.5 and under. A white space or php declaration or "xml prologue" or anything before the doctype will do it too (send IE into Quirks mode). I don't mean before the script is sent if you use PHP, but I mean whatever's rendered (if the page is online and you click View Source, that's what IE sees).

    Maybe IE5.5 had some other, funky way of setting padding on inputs?
     
    Stomme poes, Mar 15, 2008 IP