- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
HTML/CSS. How to create vertical and horizontal menu
March 13, 2020
This tutorial will show you how to create a vertical and horizontal menus in HTML using CSS styles. Before you proceed please make sure you are familiar with unordered list HTML tags. Also please check the tutorial on how to create a menu in HTML.
Ok, first of all create an HTML menu using the unordered list:
Then you need to create new CSS file and attach it to the HTML page:
Make sure you put the CSS attachement code into the
tag of your html page.You can also use the inline styles.
As a result you shou have the following HTMl code:
沙巴体育 365bet-Chinese-careers@yibangyi.net 吞噬小说网 中国教育在线初中频道 中国集邮门户网 Sabah-sports-betting-careers@swissabc.net 足球外围平台 常州恐龙园官网 体育博彩 体育博彩 太阳城娱乐 Sabah-Official-website-feedback@dienmaythanhlong.net Sabah-Official-website-admin@chapterdesign.net 皇冠体育 湖南民生网 Crown-cash-hr@tdwang.net 体育平台 Sports-betting-platform-feedback@lyhymh.net 科菲科技 足球买球 高中语文同步教学网 哑铃8健身网 巴士图库 聊宅网 沈阳搜房网-新房 生态美家官网 越资源论坛 闽西网 好孩子官方商城 翔鹰帝国网 站点地图 寻觅网 中考查分网 私有云
The unordered list has it’s own styles so without any additional changes you have a vertical menu.
As for the horizontal menu you need to perform some changes in HTML and CSS.
First of all add new class to the list, replace with
Now in the CSS file let’s make the menu horizontal. The unordered list has margin and padding values assigned by default. we need to clear them:
ul.horizontal{ margin:0; padding:0; }
Then make your list items display horizontally:
ul.horizontal li{ display:block; float:left; padding:0 10px; }
We added the horizontal padding value to the list items to make then not stick to each other. Now your menu is ready, assign links, add some fancy colors and background and your are good to go.
Zemez Responsive Navbar JavaScript

The average user has neither time nor patience to surf your website in search of the required information. Difficult-to-use navigation makes the user feel awkward and may leave the site anytime. Choose Zemez responsive Navbar JavaScript to avoid these mistakes and boost the functionality of your web resource.
This Navbar JavaScript is a beautiful solution for those who want to add more power to a web resource. The package comes with 8 unique layouts, multi-level dropdowns and megamenus, available in light and dark color schemes. Moreover, it is cross-browser compatible as it supports Edge 15+, Firefox 54+, Chrome 51+, Safari 10+. Click the demo link to view a demonstration of this script work.
More features:
- SASS
- Sticky navbar
- Fixed and fullwidth layouts
- Flexbox based
- Round-the-clock support