Where is the 5px comes form?

in my xhtml design with div/css,i found a strange problem.the input field of the form is higher then what i set to. for example:,the actually view height in the explorer(ie6,ie7,firefox) is 23px, so, where is the 5px higher comes from?

there is the demo on the internet:



thank you,Dan O. it is.

2 Answers

  • Anonymous
    1 decade ago
    Favorite Answer

    You need to add some padding to the span selector. Try adding the property:

    padding: 1px;

    Adjust it until it looks right.

    You can also use "padding-bottom" or padding-top

    For more information go to:


  • 1 decade ago

    You are most likely setting the text height for the input box. The extra 5 pixels comes from the border around the text box.

    Have you tried taking off 5 pixels from the text box to see if this fixes your problem?

Still have questions? Get your answers by asking now.