• Horizontal css menu with icons. Vertical menu with CSS Vertical menu with css icons

    Vertical menu done on the basis of a list, bulleted or numbered. By default, all list elements are arranged vertically, occupying the entire width of the container element, which in turn occupies the entire width of its container block.

    List elements can contain not only links, but also headings, icons, and pictures. Using the vertical menu, you can create comments on the site, a list of categories, etc.

    1. Vertical menu with header

    Simple elegant design option. Suitable for styling categories on a website. When hovered, the list item changes the link color.

    Categories

    * (box-sizing: border-box; margin: 0;).widget ( padding: 20px 30px; background: white; font-family: "Roboto", sans-serif; ) .widget-title ( text-transform: uppercase ; letter-spacing: 2px; font-size: 16px; margin-bottom: 15px; border-left: 2px solid #b99d61; -style: none; ) .widget-list a:before ( content: "\2014"; margin-right: 14px; ) .widget-list a ( text-decoration: none; outline: none; display: block; padding: 6px 0; letter-spacing: 1px; color: #444; transition: .3s linear; .widget-list a:hover (color: #b99d61;)

    2. Vertical menu in the style of “subway map”

    An interesting solution for designing a vertical menu; it is possible to add nested menus. “Metro line” is the left border of the list, markers are generated before each link.

    .metro ( list-style: none; padding: 0; margin: 30px 0 0 50px; border-left: 5px solid #DAE4F1; ) .metro li (line-height: 2em;) .metro ul ( margin: 20px 0 20px 15px; border: none; list-style: none; .metro ul:before, .metro ul:after (content: ""; width: 5px; height: 28px; background: #DAE4F1; position: relative ; display: block; left: -9px; ) .metro ul:before ( transform: rotate(-45deg); margin-top: -15px; ) .metro ul:after ( transform: rotate(45deg); bottom: -20px ; ) .metro ul li (border-left: 5px solid #DAE4F1;) .metro ul li:first-child ( margin-top: -5px; padding-top: 5px; ) .metro ul li:last-child ( padding -bottom: 9px; margin-bottom: -25px; ) .metro a ( text-decoration: none; display: block; font-family: "Noto Sans", sans-serif; color: #4A4B4D; ) .metro a: before ( content: ""; display: inline-block; background: #CA682D; width: 12px; height: 12px; left: -9px; position: relative; border-radius: 50%; margin-right: .5em; )

    3. Vertical menu with hover effects

    The icon and background fill that appear when you hover over a list item will help diversify the design of vertical menu elements.

    Categories

    .category-wrap ( padding: 15px; background: white; width: 200px; box-shadow: 2px 2px 8px rgba(0,0,0,.1); font-family: "Helvetica Neue", Helvetica, Arial, sans -serif; ) .category-wrap h3 ( font-size: 16px; color: rgba(0,0,0,.6); margin: 0 0 10px; padding: 0 5px; position: relative; ) .category-wrap h3:after ( content: ""; width: 6px; height: 6px; background: #80C8A0; position: absolute; right: 5px; bottom: 2px; box-shadow: -8px -8px #80C8A0, 0 -8px #80C8A0 , -8px 0 #80C8A0; ) .category-wrap ul ( list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(0,0,0,.3); ) .category- wrap li (margin: 12px 0 0 0px;) .category-wrap a ( text-decoration: none; display: block; font-size: 13px; color: rgba(0,0,0,.6); padding: 5px ; position: relative; transition: .3s linear; ) .category-wrap a:after ( content: "\f18e"; font-family: FontAwesome; position: absolute; right: 5px; color: white; transition: .2s linear ; ) .category-wrap a:hover ( background: #80C8A0; color: white; )

    4. Vertical menu with icons

    Menu icons create a visual anchor, complementing the verbal description of each category. To display icons you need to connect . You can also use any other icon font or picture icons.

    Categories

    * (box-sizing: border-box; margin: 0;).widget ( padding: 20px; border: 5px solid #f1f1f1; background: #fff; border-radius: 5px; font-family: "Roboto", sans- serif; ) .widget h3 ( margin-bottom: 20px; text-align: center; font-size: 24px; font-weight: normal; color: #424949; ) .widget ul ( margin: 0; padding: 0; list -style: none; width: 250px; ) .widget li ( border-bottom: 1px solid #eaeaea; padding-bottom: 15px; margin-bottom: 15px; ) .widget li: last-child ( border-bottom: none; margin-bottom: 0; padding-bottom: 0; ) .widget a ( text-decoration: none; color: #616a6b; display: inline-block; ) .widget li:before ( font-family: FontAwesome; font-size : 20px; vertical-align:bottom; color: #dd3333; margin-right: 14px; 2):before (content:"\f0d0";) .widget li:nth-child(3):before (content:"\f0cd";) .widget li:nth-child(4):before (content:" \f028";).widget li:nth-child(5):before (content:"\f03d";)

    5. Vertical menu with pictures

    This example can be used to design blocks with new products, similar products, etc. online store website.

    Jpeg">

    Product 1
    ₽ 2000
    Product 2
    ₽ 2500
    Product 3
    ₽ 2070
    @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,600"); .col ( width: 300px; background: white; padding: 20px; border: 1px solid #eeeeee; font-family: "Open Sans", sans-serif; ) .col * (margin: 0;).widget-title ( margin: 0 0 30px; text-transform: uppercase; font-size: 20px; overflow: hidden); "; position: relative; display: inline-block; width: 100%; vertical-align: middle; right: -15px; margin-right: -100%; border-top: 2px solid #cca86d; ) .price-line (margin-bottom: 20px;).price-line:last-child (margin-bottom: 0;).price-line:after ( content: ""; display: table; clear: both; ) .product-image ( width: 80px; float: left; .product-image a ( display: block; outline: none; ) .product-image img ( display: block; width: 100%; ) .product-content ( float: left; margin -left: 20px; ) .product-title ( font-size: 18px; margin-bottom: 10px; line-height: 1; ) .product-title a ( text-decoration: none; color: #242424; ) .price -box ( color: #666; font-size: 18px; line-height: 1; ) .star-rating ( margin-bottom: 10px; font-size: 13px; position: relative; font-family: "FontAwesome"; ) .star-rating:before ( content: "\f005 \f005 \f005 \f005 \ f005"; position: absolute; top: 0; left: 0; color: #FF9919; )

    Good website navigation is very important for bloggers. With its help, the visitor quickly finds the desired blog page. Search engines also appreciate the clarity of the site. In this article you will learn how to make a horizontal menu for Blogger with pop-up icons.
    A menu with pop-up icon buttons is created in CSS. To view the menu, click on the button below:

    How to insert a horizontal css menu with icons on Blogger

    1. Go to the “Template” tab, place the cursor in the editor (anywhere),
    2. Press Ctrl + F to search by code and find the code section ]]>
    3. Insert the following code before this code:
      ..

      /* The CSS Code for the menu starts here bloggertrix.com */ #btrix-nav (margin: 100px auto;list-style: none;width: 632px;height: 87px;overflow-y: hidden;)
      #btrix-nav li (float: left;)
      #btrix-nav li a (display: block;color: white;width: 120px;height: 61px;margin-top: 24px;text-decoration: none;text-align: center;border-top: 1px solid #bbb; border-bottom: 1px solid #555;)
      #btrix-nav li a span.aname (font: bold 17px/61px "Arial";color: #fff;text-transform: uppercase;cursor: pointer;position: relative;top: 0;transition: top .5s ease; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);)
      #btrix-nav li a img (position: relative;top: 0;transition: top .5s ease;)
      #btrix-nav li a:hover (cursor: pointer;)
      #btrix-nav li a:hover img (top: -85px;)
      #btrix-nav li a:hover .aname (top: 85px;)
      #btrix-nav li:nth-child(1) a (background: #3eb006;border-radius: 5px 0 0 5px;border-left: 1px solid #bbb;)
      #btrix-nav li:nth-child(2) a (background: #9bc704;)
      #btrix-nav li:nth-child(3) a (background: #0dc3ff;)
      #btrix-nav li:nth-child(4) a (background: #51a2ec;)
      #btrix-nav li:nth-child(5) a (background: #6e3cab;border-radius: 0 5px 5px 0;border-right: 1px solid #555;)

    4. Now go to the “Design” tab,
    5. Add a new HTML/JavaScript element and add the code:


    6. Home https://2.bp.blogspot.com/-vcR6lUGsroY/Ug5ATZk8oZI/AAAAAAAAA00/XENkFMaBgv0/s1600/btrix-home.png" />

    7. Download https://2.bp.blogspot.com/-TcXder58ssQ/Ug5ASx8pT0I/AAAAAAAAA0o/5UdA4_gLnV8/s1600/btrix-download.png" />

    8. MySql https://2.bp.blogspot.com/-umlQ7fKXobk/Ug5AT2bLnnI/AAAAAAAAA08/yrQHl6qPMH8/s1600/btrix-mysql.png" />

    9. HTML https://2.bp.blogspot.com/-2-iy8RJ92V8/Ug5ASDCru-I/AAAAAAAAA0c/GOBCPpZlA04/s1600/Btrix-html.png" />

    10. Contacts https://4.bp.blogspot.com/-vsm9s0yQr9I/Ug5ASjqawnI/AAAAAAAAA0k/rqb01AbGaFw/s1600/btrix-contact.png" />
    11. Make the necessary changes to the code that you added to the HTML/JavaScript gadget:
    • Change the # icon to a link to the desired blog page (for example, tag page, contact page, blog home page, etc.)
    • link to the image highlighted in orange, replace with a direct link to the picture icon for the corresponding item.
    • Item highlighted in blue, this is the css menu page title.
  • Move the HTML element? JavaScript in the right place in the “Design” tab of the blog.
  • For your menu, you can use icons, logos and other png images with a transparent background. In order to find the images you need, it is better to use the icon search. For example, iconsearch.ru

    This is a list of links leading to different pages on the site. It looks good when the list of links, instead of simple markers, is supplemented with icons and it is not at all necessary to use graphics here. Why create unnecessary database queries?

    HTML code

    Between tags li write the link a(# temporary stub) with two block elements inside span. In the first span - tag i with an icon class whose code was copied from the site Font Awesome. In the second span- the name of the link, that is, the text.





    • Bicycles





    • Motorcycles





    • Buses





    • Cars





    • Helicopters


    After connecting between tags head icon font Font Awesome- the menu looks like this.

    CSS styles

    To start with Google Font We’ll select an attractive font that supports Cyrillic if the vertical menu is in Russian.

    Copy the connection code of the selected font and paste it on top CSS file.

    @import url("https://fonts.googleapis.com/css?family=Marck+Script");

    In the selector body write the name of the selected font and set its size.

    Body (
    margin: 0;
    padding: 0;
    font-family: "Marck Script", sans-serif;
    font-size: 20px;
    }

    We position our menu relative to the browser window, retreating from the top by 10% and from the left by 20%. Of course, these numbers are taken from the ceiling; you will have your own.

    Ul (
    position: absolute;
    top: 10%;
    left: 20%;
    }

    We fix the menu width at 200 pixels.

    Width: 200px;

    We have reached the list menu items. Removing markers from items li.

    Ulli (
    list-style: none;
    }

    We designate frames at the top and bottom that separate the menu items from each other.

    Border-top: 1px solid #131313;
    border-bottom: 1px solid #131313;
    margin: -1px 0;

    There are not enough side frames and separators between icons and link names.

    Draw the right frame for the tag a, which is an inline element, and you cannot create a border around an inline element. Therefore, we display the tag a block element.

    Ulli a (
    display: block;
    }

    Now you can set the frame, remove the underlining of the links and specify the color of the links.

    Border-right: 1px solid #131313;
    text-decoration: none;
    color: #131313;

    The left frame is still missing.

    Tags span- block elements, inside of which there will be text, therefore span display it as an inline-block element.

    Ulli a span (
    position: relative;
    display: inline-block;
    }

    We need for the first span, inside which there will be an icon, set styles that differ from the second span. For this purpose the first span denote by pseudo-class - span:nth-child(1) and style it separately. Set the right and left frame and width.

    Ul li a span:nth-child(1) (
    width: 30px;
    border-left: 1px solid #131313;
    border-right: 1px solid #131313;
    }

    The icons will be placed in the middle with 10 pixel margins in all directions.

    Text-align: center;
    padding: 10px;

    The icons will be dark in color, 20 pixels in size, on a red background.

    Color: #131313;
    font-size: 20px;
    background: #f44336;

    In the second pseudo-class, you only need to set the fields.

    Ul li a span:nth-child(2) (
    padding: 10px;
    }

    Now vertical menu took its final form. See the entire code and result.

    In this post we will make a fixed side information menu. To implement icons, we will connect the font.

    Step 1. Connect the font with icons, create an empty document

    You can find detailed information about working with the FontAwesome font and a link to the project itself in my post -.

    Here is the code for the page with the attached files:

    Fixed side menu

    Step 2: Add HTML markup for the fixed menu

    Here is the markup code for our fixed menu:

    As you noticed, I applied the tag

    Step 3. Add HTML markup for the submenu

    The submenu is the same list as the main menu, plus a tag , which displays the “carriage on the left” icon, performs the function of a kind of “tail”, more details in the picture below :)


    This element also connects the void between the menu block and the submenu, thereby allowing us to implement the transition option.

    Step 4. Write styles for the fixed side menu

    I tried to comment on the style code in places where it matters. In general, all uncommented points relate to the banal stylization of the background, color, etc.

    #sidebar-menu ( position: fixed; /* fix our menu */ top: 200px; /* position of the menu relative to the top edge of the browser */ left: 0; /* stick the menu to the left edge */ padding: 10px; background: # 323A45; color: #FFF; border-radius: 0 8px 8px 0; ) #sidebar-menu li ( position: relative; cursor: pointer; ) #sidebar-menu li i ( /* Set the icons to a fixed size, height and line- height should be the same */ width: 27px; line-height: 27px; background: #3CB7E7; #sidebar-menu li+li (margin-top: 4px;) #sidebar-menu b ( display: none; position: absolute; /* position relative to the left edge is equal to the width of the element li */ left: 27px; top: 0; height: 27px; /* width is equal to the gap between the block menu and submenu */ width: 16px; line-height: 27px; background: transparent; color: #323A45; /* position the icon itself to the right so that it looks visually together with the submenu block */ text-align: right) -menu li > ul ( display: none; position: absolute; top: -10px; left: 42px; width: 120px; padding: 10px; background: #323A45; border-radius: 8px; ) #sidebar-menu li:hover b, #sidebar-menu li:hover ul (display: block;) #sidebar-menu li a (display: block; padding: 4px 8px; border-radius: 4px; color: #FFF ; -webkit-transition: all .2s; -moz-transition: all .2s; -o-transition: all .2s ) #sidebar-menu :hover ( display: block; background: #3CB7E7; )

    If you have questions about styling, write in the comments to this post, I will be happy to answer.
    That's it! Fixed side menu ready 🙂

    There are a lot of ready-made solutions for creating such panels using jQuery, separate plugins and modules for various content management systems.
    This is all very good, but is it possible to implement side slide panels using CSS exclusively? Of course you can! But be careful))), keeping in mind that not all browsers support modern CSS3 properties equally well.

    Not so long ago, he “produced on-the-mountain” a solution and an example of work. One of the first comments was: “let’s move it to the side...”. Why not? Let's)).

    Today I’ll tell you and show you an example of how you can use “CSS magic” to create a completely functional click-to-click menu.
    To begin with, according to established tradition, we look at a live example of the panel’s operation, then, together with those who need it, we will consider the whole scenario, what, how and why. Anticipating questions, I prepared options for the menu location, both on the left and on the right:

    HTML Markup

    Let's start the analysis with a panel switch, for which we use a standard flag ():

    Place the checkbox at the top of the document, preferably right after the tag . We write the hidden attribute, directly indicating the “hidden” state of this element, and also assign a unique identifier, id="nav-toggle" for example, to link with the for attribute of the tag

    I used the tag as a wrapper for the sidebar content