0

hello
i have set a form with tow tag : first is an input[text] and the seconde is input[submit] , what i try to do is to align the tow element in one line , the problem is i'm getting margin top of the first input tag (input[text]) , i don't know if this is a default margin of the input[text] element , this is my code
thank you in advance.

2
Contributors
3
Replies
17
Views
3 Months
Discussion Span
Last Post by gentlemedia
0

Set on both inputs a vertical-align: top and you can ditch the display: inline declarations, because inline is already the default display value for inputs.

Another thing;; there's a specific type="search" for your search field instead of using type="text".

Edited by gentlemedia

0

thank you @gentlemedia , i know that we can fix it by adding vertical-align : top ( it is commented in the code ) , i m just curious about another fix of this problem .

0

form { display: flex }

But you will need to add the necessary prefixes if you have/want to support older browsers and IE 10 uses even an older (discarded) version of the flexbox specification.
You could also use http://leaverou.github.io/prefixfree/ and be done with it.

Edited by gentlemedia

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.