- 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:
中国采暖散热器网 澳门银河 澳门赌场 典典养车 Gambling-software-billing@bedbugstreatment.net 立博 Nine-Games-Club-marketing@0797-114.com Buying-website-support@cnrhfs.net Ladbrokes-contactus@hzhanbin.com Football-buying-marketing@azaleagunstorage.net 众合教育 SJM-(SJM)-help@jordanrippe.com 买球网站 Football-buying-customerservice@mschild.net 富易堂 买球app 美高梅 中国古典书籍 SJM-(SJM)-sales@jyrjfs.com 证券时报数字报 叶子猪笑傲江湖ol官网 真笔字网名设计器 安卓网安卓乐翻频道 济南大学泉城学院 衡阳百姓网 I Do 山西医科大学 平阳网 博宝古玩城 中国基金网基金行情 苏教版高中语文教学网 招商贷 站点地图 携手健康网两性频道
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
![Zemez Responsive Navbar JavaScript.](http://wtqkt8v9.web-sitemap.sparklesjewelry.net/help/wp-content/uploads/2011/11/zemez-responsive-navbar-javascript.jpg)
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