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.

Recommended Answers

All 3 Replies

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".

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 .

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.