Adding a Horizontal Drop-Down Menu With Sub Tabs In Two Columns In Blogger
Step 1. Go to Blogger Dashboard
Step 2. Click "Layout" and hit "Page Elements" section.
Step 3. Click on the "Add a Gadget" link just under your header image From the Gadget's List, select "HTML/JavaScript" option.
Step 4. Copy and paste the code below and paste it in the blank page.
Note: Replace the "Title" and "SubTab" title section of this widget with your own.
<div id='btttab'>
<div id='btttopwrapper'>
<ul id='top'>
<li><a href='http://YOUR URL HERE.com'>Tab 1 Title Here</a></li>
<li><a href='http://YOUR URL HERE.com'>Tab 2 Title Here</a></li>
<li><a class='submenucol' href='#'>Tab 3 Title Here</a>
<ul>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.1</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.2</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.3</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.4</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.5</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 3.6</a></li>
</ul>
</li>
<li><a class='submenucol' href='#'>Tab 4 Title Here</a>
<ul>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.1</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.2</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.3</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.4</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.5</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 4.6</a></li>
</ul>
</li>
<li><a class='submenucol' href='#'>Tab 5 Title Here</a>
<ul>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.1</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.2</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.3</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.4</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.5</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.6</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.7</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 5.8</a></li>
</ul>
</li>
<li><a href='http://YOUR URL HERE.com'>Tab 6 Title Here</a></li>
</ul>
<br class='clearit'/>
</div>
</div>
Replace 'http://YOUR URL HERE.com' with the URL of your post. or you can just put a # sign on it.
To add as many of the main tabs as you need, just copy the entire code below for the main tab for each additional tab you want:
<li><a href='http://YOUR URL HERE.com'>Tab 7 Title Here</a>
<ul>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 7.1</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 7.2</a></li>
<li><a href='http://YOUR URL HERE.com'>Sub Tab 7.3</a></li>
</ul>
</li>
Step 5. Now let's go a step further and add the CSS style in our Template. Back to Blogger Dashboard, go to Template > Edit HTML
Step 6. Search for the tag ]]></b:skin> and just above it paste the code below.
/* Horizontal menu with 2 columns
----------------------------------------------- */
#btttab {
width:940px;
height:37px;
background-image: -moz-linear-gradient(top, #666666, #000000);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, #666666), color-stop(1.0, #000000));
filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#666666,endColorStr=#000000);
border-bottom:1px solid #666666;
border-top:1px solid #666666;
margin:0 auto;padding:0 auto;
overflow:hidden;
}
#btttopwrapper {
width:940px;
height:40px;
margin:0 auto;
padding:0 auto;
}
.clearit {
clear: both;
height: 0;
line-height: 0.0;
font-size: 0;
}
#top {
width:100%;
}
#top, #top ul {
padding: 0;
margin: 0;
list-style: none;
}
#top a {
border-right:1px solid #333333;
text-align:left;
display: block;
text-decoration: none;
padding:10px 12px 11px;
font:bold 14px Arial;
text-transform:none;
color:#eee;
}
#top a:hover {
background:#000000;
color:#F6F6F6;
}
#top a.submenucol {
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3katXD-qvB1ZA8UleU4J_HKzoMO88CoL_MpUrP9w4YFTwE4ur3b4utAkB7nODa38klAIyHFPx-hPB5mxoSze_sGS_VEmeinTlgWW_mupdOHqQZvWONExPqnX6hBZqjLIwWYqCCayZL8g/s1600/arrow_white.gif);
background-repeat: no-repeat;
padding: 10px 24px 11px 12px;
background-position: right center;
}
#top li {
float: left;
position: relative;
}
#top li {
position: static !important;
width: auto;
}
#top li ul, #top ul li {
width:300px;
}
#top ul li a {
text-align:left;
padding: 6px 15px;
font-size:13px;
font-weight:normal;
text-transform:none;
font-family:Arial, sans-serif;
border:none;
}
#top li ul {
z-index:100;
position: absolute;
display: none;
background-color:#F1F1F1;
margin-left:-80px;
padding:10px 0;
border-radius: 0px 0px 6px 6px;
box-shadow:0 2px 2px rgba(0,0,0,0.6);
filter:alpha(opacity=87);
opacity:.87;
}
#top li ul li {
width:150px;
float:left;
margin:0;
padding:0;
}
#top li:hover ul, #top li.hvr ul {
display: block;
}
#top li:hover ul a, #top li.hvr ul a {
color:#333;
background-color:transparent;
text-decoration:none;
}
#top ul a:hover {
text-decoration:underline!important;
color:#444444 !important;
}
Step 7. Now find (CTRL + F) this line: It will also have some little lines or codes beneath it like the below:
.tabs-inner {
margin: .5em $(tabs.margin.sides) $(tabs.margin.bottom);
padding: 0;
}
.tabs-inner .section {
margin: 0;
}
.tabs-inner .widget ul {
padding: 0;
background: $(tabs.background.color) $(tabs.background.gradient) repeat scroll bottom;
-moz-border-radius: $(tabs.border.radius);
-webkit-border-radius: $(tabs.border.radius);
-goog-ms-border-radius: $(tabs.border.radius);
border-radius: $(tabs.border.radius);
}
.tabs-inner .widget li {
border: none;
}
.tabs-inner .widget li a {
display: inline-block;
padding: .5em 1em;
margin-$endSide: $(tabs.spacing);
color: $(tabs.text.color);
font: $(tabs.font);
-moz-border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
-webkit-border-top-left-radius: $(tab.border.radius);
-webkit-border-top-right-radius: $(tab.border.radius);
-goog-ms-border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
border-radius: $(tab.border.radius) $(tab.border.radius) 0 0;
background: $(tab.background);
border-$endSide: 1px solid $(tabs.separator.color);
}
.tabs-inner .widget li:first-child a {
padding-$startSide: 1.25em;
-moz-border-radius-top$startSide: $(tab.first.border.radius);
-moz-border-radius-bottom$startSide: $(tabs.border.radius);
-webkit-border-top-$startSide-radius: $(tab.first.border.radius);
-webkit-border-bottom-$startSide-radius: $(tabs.border.radius);
-goog-ms-border-top-$startSide-radius: $(tab.first.border.radius);
-goog-ms-border-bottom-$startSide-radius: $(tabs.border.radius);
border-top-$startSide-radius: $(tab.first.border.radius);
border-bottom-$startSide-radius: $(tabs.border.radius);
}
.tabs-inner .widget li.selected a,
.tabs-inner .widget li a:hover {
position: relative;
z-index: 1;
background: $(tabs.selected.background.color) $(tab.selected.background.gradient) repeat scroll bottom;
color: $(tabs.selected.text.color);
-moz-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
box-shadow: 0 0 $(region.shadow.spread) rgba(0, 0, 0, .15);
}
/* Headings
----------------------------------------------- */
Step 9. Replace the code that you have removed above, add this one:
#crosscol ul {z-index: 200; padding:0 !important;}
#crosscol li:hover {position:relative;}
#crosscol ul li {padding:0 !important;}
.tabs-outer {z-index:1;}
.tabs-inner {padding: 0 0px;}
Step 10. Save the Template and you are done pal!
If you have any questions or need help, regarding this post please leave a comment below.
Thank you and Have blissful blogging!!!
About the Author:
Hello folks! This is GOLDEN WORKS TV, the admin of this blog. No words could described my grateful appreciations to all newbie and professional bloggers around the world and most especially to Almighty God who gave me the wisdom...Read More
No comments :
Post A Comment!
Post A Comment!
We love to hear your feedbacks and suggestions. We will try our best to reply to your queries as soon as time allows. Please keep in mind that all comments are moderated manually by our editors team to minimize spamming, and all the links are nofollow.
Note:
1. To add HTML code in the box, please use our HTML editor generator.
2. Please do not spam. Those type of comments will be deleted upon our review.
3. We should appreciate an individual and suggestive discussion.
Best Regards,
GOLDEN WORKS TV