I believe removing the floats would enhance the overall clarity of the webpage, particularly for me.
To position elements within the header, I utilized the flexbox feature of css. For more information on this, you can refer to: https://css-tricks.com/snippets/css/a-guide-to-flexbox/enter link description here
If you have a preference for the header to remain at the top and disappear when scrolling down or to float over the content even when scrolling down, please uncomment the corresponding option in the CSS code.
HTML:
<body>
<div class="bg">
<header>
<div class="logoContainer">
<img src="http://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg">
</div>
<ul class="main-nav">
<li class="active"><a href="#">HOME</a></li>
<li><a href="#">PHOTOS</a></li>
<li><a href="#">PLAYERS</a></li>
<li><a href="#">NEWS</a></li>
<li><a href="#">SCHEDULE</a></li>
</ul>
</header>
<div class="socialLinksContainer">
<div class="instagram">
<a href="#"><img src="https://static.pexels.com/photos/104827/cat-pet-animal-domestic-104827.jpeg"></a>
</div>
<div class="twitter">
<a href="#"><img src="https://www.petmd.com/sites/default/files/petmd-cat-happy-13.jpg"></a>
</div>
</div>
Main content goes here
</div>
</body>
CSS:
header {
height: 10vh;
background-color: rgba(255, 255, 255, 0.4);
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
//uncomment this for the header to float over the content
//position: fixed;
//top: 10px;
}
.logoContainer {
height: 10vh;
}
.logoContainer > img {
max-width: 100%;
max-height: 100%;
}
.main-nav {
list-style: none;
margin-top: 100 px;
margin-left: 350 px;
}
.main-nav li {
display: inline-block;
}
.main-nav li a {
color: white;
text-decoration: none;
padding: 5 px 10 px;
font-family: "Roboto", sans - serif;
font-size: 15 px;
}
.main-nav li.active a {
border: 1 px solid white;
}
.main-nav li a: hover {
border: 1 px solid white;
}
# logo img {
width: 150 px;
height: 145 px;
padding-left: 10 %;
}
body {
font-family: sans-serif;
color: red;
}
hr {
width: 100 %;
height: 1 px;
background: #fff
}
.socialLinksContainer {
position: fixed;
right: 5px;
bottom: 5px;
display: flex;
flex-direction: row;
}
.title {
position: relative;
width: 1200 px;
margin-left: 0 px;
margin-top: 0 px;
}
.instagram > a > img {
max-width: 30px;
max-height: 30px;
margin-top: 10 px;
padding-left: 960 px;
}
.twitter img {
max-width: 30px;
max-height: 30px;
margin-top: 10 px;
padding-left: 30 px;
}
body,
html {
height: 100 %;
}
body {
background-image: url('https://cdn.hockeycanada.ca/hockey-canada/Team-Canada/Men/World-Cup/2016/sep_29_wch_team.jpg');
background-repeat: no-repeat;
background-size: cover;
}
.imageUnderTheNavbar {
max-height: 50px;
}
Please review this fiddle for a visual representation: https://jsfiddle.net/5ufpomy4/4/
Does this align with your vision for the design?