html - Centering my text in Bootstrap navbar -
this question has answer here:
i creating navbar using bootstrap text stationed on left. cannot figure out how text in center of navbar , stay there when resizing , viewing site on different devices. have tried bypassing float: left; below code still can't figure out.
body { font-family: century gothic; } .nav { display: inline-block; float: none; } .li { text-align: center; } .footer { background-color: #263238; height: 5%; } .footer-text { color: white; font-size: 20px; text-align: center; margin-top: 12px; }
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>my website</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid-nav"> <div> <ul class="nav navbar-nav"> <li><a href="#">csgo</a> </li> <li><a href="#">arma iii</a> </li> <li><a href="#">pubg</a> </li> <li><a href="#">other</a> </li> <li><a href="#">about</a> </li> <li><a href="#">external links</a> </li> </ul> </div> </div> <div class="footer navbar-fixed-bottom"> <p class="footer-text">copyright 2017 ©</p> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="script.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html>
pretty new stuff sorry if it's staring me straight in face.
thanks.
add text-center
class <div class="container-fluid-nav text-center">
Comments
Post a Comment