I am trying to make a navigation bar exactly like this one on the image. I made it in Photoshop for few seconds but it is not easy to make it in code. The progress is that I wrote code for it, but I am afraid it is NOT responsive. I mean it may get at some point after loads of tweaking with media queries.
What would be your approach of creating this navigation bar ? How would you create the little shape underneath the logo ? My approach was to slice the shape and slice the logo and code it, but it is not very responsive.
HTML
<header>
<div class="float_center">
<ul class="navigation">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li>
<img class="shape" src="<?php echo site_url('assets/images/test.png');?>"/>
<div class="logo"></div>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</header>
CSS
header
{
background-color:rgba(0, 0, 0, 0.74);
height:100px;
}
.float_center
{
float: right;
position: relative;
left: -50%; /* or right 50% */
text-align: left;
}
.float_center > .navigation
{
position: relative;
left: 50%;
}
ul.navigation
{
list-style-type: none;
margin:0;
padding:10px 0;
}
ul.navigation > li
{
float: left;
list-style-type: none;
margin: 0 6px;
}
ul.navigation > li > a
{
display: block;
height: 26px;
line-height: 70px;
font-family: "American Captain";
font-size: 20px;
letter-spacing: 2px;
color: #FFF;
text-transform: uppercase;
padding: 0px 50px;
}
ul.navigation > li > a:hover, a:active, a:focus
{
color: #d43100;
}
.logo
{
background: url("../images/logo.png");
background-repeat:no-repeat;
background-size: 150px;
height:150px;
display:block;
width:150px;
margin-top:6px;
padding: 0;
}
.shape
{
position: absolute;
width:28%;
top: 101px;
left: 31.5%;
z-index: -1;
}
2
Answers
1st iteration
Demo: http://codepen.io/dcdev/full/Jhtxv/
2nd iteration
Based on kshay’s answer which I thought was a better solution than my previous hastily typed out example.. I took his example and improved it a bit further in the spirit of making it slightly more efficient..
Demo: http://cssdeck.com/labs/full/z4rbbe47
3rd iteration
Decided to fiddle around with it a tad more this evening and I think I got it just about perfect..
Demo: http://cssdeck.com/labs/full/z4rbbe47
Full width:
Approx 600px width:
I didn’t get an image you can find it and add it here is the demo http://jsfiddle.net/zf2kkyLc/2/
Html
CSS