html - Vertically align glyphicons in a jumbotron -
i have created jumbotron , on left have text on left , text glyphicons right. while text on left vertically aligned middle, text on right along glyphicon below jumbotron.
here html code:-
<div class="jumbotron" > <div class="container-fluid text-left" style="padding-left:4px;"> <p style="color:#f8921e">text</p> <ul style="list-style-type:none "> <li><a class="glyph" href="#"> <span class="glyphicon glyphicon-cog"></span> settings</a></li> <li><a class="glyph" href="#"> <span class="glyphicon glyphicon-log-out"></span> logout</a></li> </ul> </div> </div>
this css code:-
.jumbotron { width:100%; color: #f8921e; top:0; padding:20px; z-index:9; position:fixed; height:10%; background-color:black; } .glyph { margin-right:20px; font-size:100%; color:#f8921e; float:right; padding-top:10px; display:block; text-align:center; }
check out. when write logout , settings unordered list, becomes block of code. separates text in p block.
https://jsfiddle.net/2ebc317l/
.jumbotron { width:100%; color: #f8921e; top:0; padding:20px; z-index:9; position:fixed; height:10%; background-color:black; } .glyph { margin-right:30px; font-size:100%; color:#f8921e; float:right; display:block; text-align:center; }
<div class="jumbotron" > <div class="container-fluid text-left" style="padding-left:4px;"> <p style="color:#f8921e">text <a class="glyph" href="#"> <span class="glyphicon glyphicon-cog"></span> settings</a> <a class="glyph" href="#"> <span class="glyphicon glyphicon-log-out"></span> logout</a> </p> </div> </div>
if trying make navigation bar, wouldnt suggest way, because cause more , more problems add stuff. navigation bar in bootstrap, there easier , better ways
Comments
Post a Comment