- Log into Blogger
- Create gadget code to customize your tabs and drop down menu
- Copy the text below into a text program like Microsoft Notepad.
The code is provided by Dana in her blog http://icanbuildablog.com In the article http://icanbuildablog.com/2015/08/how-to-add-a-drop-down-menu-to-a-blogger-blog-without-javascript/
<ul id="icbabdrop">
<li><a href=”LINK”>Tab Name 1</a></li>
<ul>
<li><a href=”LINK”>Drop Down Name 1.1</a></li>
<li><a href=”LINK”'>Drop Down Name 1.2</a></li>
<li><a href='”LINK”'>Drop Down Name 1.3</a></li>
</ul>
<li><a href=”LINK”>Tab Name 2</a></li>
<ul>
<li><a href=”LINK”>Drop Down Name 2.1</a></li>
<li><a href=”LINK”>Drop Down Name 2.2</a></li>
</ul>
<li><a href=”LINK”>Tab Name 3</a></li>
<ul>
<li><a href=”LINK”>Drop Down Name 3.1</a></li>
</ul>
<li><a href=”LINK”>Tab Name 4</a></li>
</ul> - Edit the text to meet your needs
- You can add as many or as few tabs and dropdowns as you need
- Change “Tab Name..” and “Drop Down Name ….” to meet your needs
- Replace ‘LINK’ with the URL that you want to see when you click that menu item
For example, if you want to see posts with a specific label replace LINK with that label's URL - If you would like your Menu item not to have an action remove the following lines
- To the left of the name remove <a href=”LINK”>
- To the right of the name remove </a></li>
- Below is an example from my own blog:
<li><a href='https://pinkpenglife.blogspot.com/'>Home</a></li> (a tab with a link)
<li>Hobbies (a tab with no link)
<ul> (two sub-menus with pointing to a page on the blog)
<li><ahref="https://pinkpenglife.blogspot.com/p/under-construction.html">Gardening</a></li>
<li><ahref="https://pinkpenglife.blogspot.com/p/under-construction.html'>Sewing</a></li>
</ul>
The above is a subset of the code to illustrate changes that can be made to the code - Create a Gadget on your blog
- On the left-hand side menu select Layout
- On the blog lay-out sections Click “+ Add a Gadget”
- On the pop-up menu select “HTML / Java Script”
- On the pop-up window use “Title” to name you gadget. (I chose Drop Down Menus)
- On the pop-up window to paste the code you created
- Click “Save”
- To show the tabs and dropdowns horizontally on your blog move the gadget to a “Cross-Column” section. In other words place it near the header to have it switch to a horizontal page.
- NOTE - you are not done; if you look at your blog now you will see many tabs and no dropdowns
- Create CSS code to customize your menu
- Copy the text below into a text program like Microsoft Notepad.
The code is provided by Dana in her blog http://icanbuildablog.com in the article http://icanbuildablog.com/2015/08/how-to-add-a-drop-down-menu-to-a-blogger-blog-without-javascript/
/* --------------------------------------- START DROPDOWN MENU CSS BY icanbuildablog.com --------------------------- */
.tabs-inner .widget ul#icbabdrop {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
border:none;
}
.tabs-inner .widget ul#icbabdrop li {
font-size: 16px; /* <---------------- Font size for the menu */
font-family: arial; /* <---------------- Font style for the menu */
color: #fff; /* <---------------- Font color for the menu */
display: inline-block;
margin-right: -4px;
position: relative;
padding: 15px 20px;
background: #transparent; /* <---------------- background colour of the main menu */
float:none;
cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
.tabs-inner .widget ul#icbabdrop li a {
padding:0;
font-family: arial; /* <---------------- Font for the menu links */
border:0;
}
.tabs-inner .widget ul#icbabdrop li:hover {
background: #555; /* <---------------- background colour when you roll over a menu title */
color: #fff; /* <---------------- font colour when you roll over a menu title */
}
.tabs-inner .widget ul#icbabdrop li:hover a {
background: transparent;
color: #fff; /* <---------------- font colour when you roll over a menu title link */
}
.tabs-inner .widget ul#icbabdrop li ul {
z-index:1000;
border:none;
padding: 0;
position: absolute;
top: 45px;
left: 30px;
float:none;
width: 150px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
-webkit-transiton: opacity 0.2s;
-moz-transition: opacity 0.2s;
-ms-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
-transition: opacity 0.2s;
}
.tabs-inner .widget ul#icbabdrop li ul li {
background: #555; /* <---------------- background colour of the sub menu items */
display: block;
color: #fff; /* <---------------- font colour of the sub menu items */
text-shadow: 0 -1px 0 #000;
}
ul#icbabdrop li ul li a{
color:#fff /* <---------------- link colour of the sub menu items */
}
.tabs-inner .widget ul#icbabdrop li ul li:hover {
background: #666; /* <---------------- background colour when you roll over sub menu items */
}
.tabs-inner .widget ul#icbabdrop li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
/* -------------------------------- END DROPDOWN MENU CSS BY icanbuildablog.com --------------------------------- */ - Edit font colors and menu colors to match your template
- Look for comments that start with /* ← this indicates where to make color changes
- NOTE: This code uses 3 characters for colors meaning white is #fff instead of #ffffff
- You can use the advanced customization tool in blogger to find the codes for the colors
- Add CSS code to activate your menu
- On the Blogger site left hand menu click “Theme”
- Below the window showing “Live on Blog” click on the Customize button
- A new window appears. On the top left hand menu click “Advanced”
- A scrolling menu appears, scroll down to the bottom and click “Add CSS”
- Paste your customized CSS code in the blank window
- On the top right hand side click the Apply to Blog button
- To the left of that button click on the << Back to Blogger link
- Make your dropdown visible
Many blogger templates will cut off your dropdown menu, don’t worry it’s easy to fix.
A very knowledgeable blogger posted instructions on https://goodtipsandmore.blogspot.com in the article https://goodtipsandmore.blogspot.com/2011/11/drop-down-menu-in-blogger-template.html - On the Blogger site left hand menu click “Theme”
- Below the window showing “Live on Blog” click on the Edit HTML button
- Click on the blank space in the HTML body
- On your keyboard simultaneously press the keys [Ctrl] and [F]
- A small search window will appear on the top right hand side of the HTML text
- In that search window text box, type .tabs-outer { and press enter
- The first line that appears highlighted should be underneath text that looks like
/* Tabs
----------------------------------------------- */ - Look for the text below
.tabs-outer {
overflow: hidden;
position: relative; - Change overflow: hidden; to overflow: visible;
- The new text should look like this:
.tabs-outer {
overflow: visible; ←--- This is what was changed
position: relative - Press the Save Theme button
- Congratulations, you are done.
- NOTE - the blogs I referenced have pictures and instructions if you get lost along the way
- If you want to change the tabs or dropdowns
- Go to the blogger menu and choose Layout
- Find your Drop Down Menu Gadget and click the Edit link
- You can change that window directly or paste new code like step 2 and 3
- If you want to change the menu colors
- On the Blogger site left hand menu click “Theme”
- Below the window showing “Live on Blog” click on the Edit HTML button
- Click on the blank space in the HTML body
- On your keyboard simultaneously press the keys [Ctrl] and [F]
- A small search window will appear on the top right hand side of the HTML text
- In that search window text box, type START DROPDOWN MENU CSS and press enter
- You will see the code from step 4, make the desired color changes
- Press the Save Theme button
No comments:
Post a Comment