PHP Developers Network
http://forums.devnetwork.net/

How do you line up Input Text/Submit elements perfectly?
http://forums.devnetwork.net/viewtopic.php?f=68&t=141782
Page 1 of 1

Author:  simonmlewis [ Thu Sep 17, 2015 6:01 am ]
Post subject:  How do you line up Input Text/Submit elements perfectly?

I need to get this input box and submit button to line up horizontally, and there seems to be a lot online about this issue with the white space above the Submit button.

This is mine. What am I doing wrong? It needs it so the top and bottom of the 'GO' button line up perfect with the input box.
Syntax: [ Download ] [ Hide ]
<style>

.logobox_search
{
float: left;
width: 295px;
margin-left: 56px;
margin-top: 40px;
font-size: 25px;
color: #ffffff;
text-align: center;
}

.logobox_search input
{
border: 2px solid #153878;
font-size: 23px;
text-align: center;
padding: 8px;
margin-bottom: 10px;
}

.logobox_search input[type="submit"]
{
background-color:  #153878;
color: #ffffff;
font-size: 21px;
text-align: center;
padding: 8px;
margin-bottom: 10px;
}
</style>

<div class='logobox_search' >
      <form method='GET' action='/index.php'>
  <input type='text' name='search' placeholder='Search Jobs'><input type='submit' value='Go'>
  </form>
  <i class="fa fa-phone fa-lg"></i> 00000 000 000
    </div>  


Attachments:
File comment: How it looks now.
test.jpg
test.jpg [ 12.62 KiB | Viewed 3768 times ]

Author:  Celauran [ Thu Sep 17, 2015 7:23 am ]
Post subject:  Re: How do you line up Input Text/Submit elements perfectly?

http://codepen.io/anon/pen/GpZWqJ?editors=110

That's what you get with just the code provided. What else is wrapping this and what other rules are affecting it?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/