开发者

Alignment issue with button and select form elements inside the paragraph?

开发者 https://www.devze.com 2023-03-18 02:48 出处:网络
My markup looks like so: <p> <select></select> <inp开发者_运维知识库ut type=\"submit\" id=\"submit\" value=\"submit\" name=\"submit\" />

My markup looks like so:

<p>
   <select></select>
   <inp开发者_运维知识库ut type="submit" id="submit" value="submit" name="submit" />
</p>

Here's the CSS:

//No specific styles for the select element nor inherited ones.

#submit {
    background: url("images/img.png") no-repeat scroll 0 0 transparent;
    border: 1px solid #FFFAEE;
    cursor: pointer;
    height: 34px;
    margin-left: 30px;
    width: 145px;
}

The issue is the submit button is a few pixels above the select element. Here's a screenshot:

Alignment issue with button and select form elements inside the paragraph?

This happens in Webkit browsers and IE but not in Firefox.


I copied your code into jsfiddle and the select and submit button align up nicely in ff,chrome and ie9.

http://jsfiddle.net/PTF3Q/

Apparently there's some code you're not supplying causing this - do you have a live url to the page?

If not, you could try: vertical-align: middle;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号