html - Vertical middle alignment -


#page-header {      display: table;      font-size: 26px;      margin-bottom: 30px;  }  #page-header div {      display: table-cell;      vertical-align: middle;  }  .fonthelvetica {      font-family: "trebuchet ms",helvetica,sans-serif;  }
<div id="page-header">  		<div class="fonthelvetica">social<span class="fontlightmaroon">network</span></div>  		<div><input type="submit" value="upload" name="upload"></div>  	</div>

i want align button in middle text "socialnetwork". font size may change, accordingly button should align in middle. using above code.

the problem <input> doesn't receive the inherit font size/line height correctly, , it's depending on browser , os. can set large font on "socialnetwork" only, i.e.

#page-header {font-size: 26px;} /*remove this*/ .fonthelvetica {font-size:26px;} /*add this*/ 

demo: http://jsfiddle.net/f43ut27s/


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -