To ensure proper display on mobile devices, remember to include the following code:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Additionally, be sure to remove two unnecessary closing div
tags located after the nav
tag. Other than that, no other issues were identified.
CSS Styling:
html{
height: 100%;
}
body{
background-image: url('background.png');
background-size: cover;
background-position: center;
}
#content{
text-align: center;
text-shadow: 0px 4px 3px rgba(0,0,0,0.4),
0px 8px 13px rgba(0,0,0,0.1),
0px 18px 23px rgba(0,0,0,0.1);
}
#const{
color: #FFFFF5;
font-weight: bold;
font-size: 5em;
}
hr{
width: 1000px;
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid rgba(0,0,0,0.2)
}
.social i{
padding-top: 100%;
font-size: 3em;
color: #cccccc;
}
.sections{
padding-top:5%;
}
.sections .section-option i{
padding-top: 15px;
color:#999999;
font-size: 13em;
}
.logo{
font-size: 1.2em;
}
/*******HAMBURGER FIX*********/
@media (min-width: 991px) and (max-width: 768px) {
.navbar-collapse.collapse {
display: none !important;
}
.navbar-collapse.collapse.in {
display: block !important;
}
.navbar-header .collapse, .navbar-toggle {
display: block !important;
}
.navbar-header {
float:none;
}}
HTML Structure:
<nav class="navbar navbar-inverse">
<div class="container">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><i class="fa fa-code logo" aria-hidden="true"></i> Halil Süheyb Becerek</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
<li><a href="#"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Blog</a></li>
<li><a href="#"><i class="fa fa-github" aria-hidden="true"></i> Projects</a></li>
<li><a href="#"><i class="fa fa-briefcase" aria-hidden="true"></i> Work / <i class="fa fa-university" aria-hidden="true"></i> Education History</a></li>
</ul>
... (continued structure)
For more details and reference, you can check the following link: Reference Link