Not able to vertically center align the div having id signInButton. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Not able to vertically center align the div having id signInButton.

** I have tried vertical-align and line-height** <nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" style="color:white" href=#"> <b>Item Catalog </b> </a> </div> <div id="signinButton" style="float:right; vertical-align: middle;"> <span class="g-signin" data-scope="openid email" data-redirecturi="postmessage" data-accesstype="offline" data-cookiepolicy="single_host_origin" data-callback="signInCallback" data-approvalprompt="force"> </span> </div> </div> </nav>

18th Feb 2018, 4:27 PM
Ashutosh
Ashutosh - avatar
2 Answers
+ 1
Try vertical-align: center; or align: center; or put it in an external CSS file and embedd it in your html
18th Feb 2018, 4:45 PM
SQL Guy
+ 1
no these are not working I have already tried vertical-align:middle; align is also not working coz that will horizontally align the div, not verticality.
18th Feb 2018, 4:51 PM
Ashutosh
Ashutosh - avatar