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*/
Comments
Post a Comment