Aligning text and select boxes to the same width in CSS?

前端 未结 7 1643
误落风尘
误落风尘 2020-12-22 23:32

Ok this is seemingly impossible to get right. I have a text box and a select box. I want them to be the same width exactly so they line up on the left margin and the right m

7条回答
  •  渐次进展
    2020-12-23 00:10

    Yes, extremely frustrating. However, I never had problems with that 'till I put a "" tag at the top of my HTML page. My webpage rendered properly on all platforms that I could test until I put that tag at the top of my document.

    While that's "genuine spec", it seems to be the source of these alignment problems. FWIW, I'm using HTML5 elements, in-line CSS, etc., all without that tag to specify HTML5. YMMV.

提交回复
热议问题