Create a Horizontal Menu

Here I will be going along through the process of creating a nice looking horizontal menu. Further, I will be designing the menu using CSS....

Here I will be going along through the process of creating a nice looking horizontal menu. Further, I will be designing the menu using CSS. A navigation menu is an important part of creating a good looking website. To make it look a bit fancy and eye catching. I have added a colorful hover on the menu. Here is the code for creating a Horizontal Menu.

HTML
    
    <html>
       <body>
          <div id="container">
          <div id="top-bar">
          <div id="top-menu">
             <ul>
                <li id="news">
                   News
                </li>
                <li id="tech">
                   Tech
                </li>
                <li id="android">
                   Android
                </li>
                <li id="windows">
                   Windows
                </li>
                <li id="others">
                   Others
                </li>
                <li id="about">
                   About
                </li>
             </ul>
          </div>
       </body>
    </html>
   

CSS
    
    body {
         font-family: Arial, sans-serif;
         margin:0;
         line-height:20px;
    }
     #top-bar {
         width:100%;
         height:46px;
         background-color:#15a226;
         margin:0;
    }
     #top-menu ul {
         float:left;
         padding:0;
         margin:0;
    }
     #top-menu li {
         float:left;
         color:#ffffff;
         list-style:none;
         padding: 14px 20px 0 20px;
    }
     #top-menu li:hover {
         height:28px;
    }
     #news:hover {
         border-bottom:4px solid #ed3482;}
     #tech:hover {
         border-bottom:4px solid #00e2ff;}
     #android:hover {
         border-bottom:4px solid #9d0a43;}
     #windows:hover {
         border-bottom:4px solid #ed8234;}
     #others:hover {
         border-bottom:4px solid #7d24ac;}
     #about:hover {
         border-bottom:4px solid #0c580f;}
        

RESULT


  • News
  • Tech
  • Android
  • Windows
  • Others
  • About

COMMENTS

Subscribe my post via Email
Name

css,5,html,3,python,1,tech,17,
ltr
item
1minutecode - Tech Blog : Create a Horizontal Menu
Create a Horizontal Menu
https://1.bp.blogspot.com/-gBup14R5NGM/XO0jr8PEIaI/AAAAAAAAB5Y/hEFsCaB8zVEdl0IKDtfdXbIfoBw5d9SbgCLcBGAs/s1600/Create%2Ba%2BHorizontal%2BMenu.png
https://1.bp.blogspot.com/-gBup14R5NGM/XO0jr8PEIaI/AAAAAAAAB5Y/hEFsCaB8zVEdl0IKDtfdXbIfoBw5d9SbgCLcBGAs/s72-c/Create%2Ba%2BHorizontal%2BMenu.png
1minutecode - Tech Blog
https://www.1minutecode.com/2015/12/create-horizontal-menu.html
https://www.1minutecode.com/
https://www.1minutecode.com/
https://www.1minutecode.com/2015/12/create-horizontal-menu.html
true
2724151228810149585
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content