How To Create Horizontal Tab Menu Using CSS





UPDATE:  I updated some of my posts, this post I update 17+ Drop Down Menu Widget in Blogger - Horizontal Menus With CSS & HTML Codes........








Instructions To Follow:
STEP #1
Log in to Blogger, go to Layout -> Edit HTML
and mark the tick box "Expand Widget Templates"

STEP #2
Now find (CTRL+F) this code in the template:
</head>
And immediately before it, paste this code:


<style type='text/css'>
#tabs28 {
float:left;
width:100%;
background:#EFF4FA;
font-size:93%;
line-height:normal;
border-bottom:1px solid #DD740B;
}
#tabs28 ul {
margin:0;
padding:10px 10px 0 50px;
list-style:none;
}
#tabs28 li {
display:inline;
margin:0;
padding:0;
}
#tabs28 a {
float:left;
background:url(&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjavDeVO9VIVHygNWxBEzfoSbg2dVY5yqF4ofHbvpoVcGHE7AM_M6-9aguss_8jXEV4FlzmmelOKvHlRNs67NCdcEewZ_F-YEs7l1ULJUbjNA4NMd5MsIdQtiXbyTJiuE8XYsrB96xaFmHP/&quot;) no-repeat left top;
margin:0;
padding:0 0 0 5px;
text-decoration:none;
}
#tabs28 a span {
float:left;
display:block;
background:url(&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3CmbapPGS6ioGM1pKevuaFZSqGNwvjhNIx8Q66z7mDCTF0nFXpX-0CixKqGO5KrU_UC_2g6kETKEjhGYAxdqJyigRUXOZCVBHSKkgkMSta3J3QtHMddKDylkcYvoMFJtPmxKIk42m-qT/&quot;) no-repeat right top;
padding:5px 15px 4px 6px;
color:#FFF;
}
#tabs28 a span {float:none;}
/* End IE5-Mac hack */
#tabsI a:hover span {
color:#FFF;
}
#tabs28 a:hover {
background-position:0% -42px;
}
#tabs28 a:hover span {
background-position:100% -42px;
}
</style>

Note : Please Host above 2 images yourself.


NOW CLICK SAVE TEMPLATE






STEP #1 Log in to Blogger, go to Layout




page-elements

Add a Gadget of HTML/JavaScript type.



image
Then add this code in to it:

<div id="tabs28">

<ul>
<li><a href="#"><span>Home</span></a></li>
<li><a href="#"><span>HTML</span></a></li>
<li><a href="#"><span>CSS</span></a></li>
<li><a href="#"><span>Java Script</span></a></li>
<li><a href="#"><span>About</span></a></li>
<li><a href="#"><span>Contact</span></a></li>
<li><a href="#"><span>Privacy Policy</span></a></li>
</ul>

</div>


NOW CLICK SAVE




thanks to Lasantha Bandara  



2 comments:

  1. Thank you! This works perfectly for what I need it for! Question though, once I get the tabs on my page, how do I link them to another page?

    ReplyDelete