The main and fundamental function of menu in a website is EASY NAVIGATION.
A responsive, beautiful and nice looking menu for a website or blog is very necessary, especially for a blogger is really important because a menu gives your blogger easy navigation through your blogger’s pages.
If you decide to monetize your blogger through Google AdSense, beside others setups easy navigation through pages in a blogger is the need for Google AdSense approval. Another point to keep in mind is the responsiveness.
Responsive layout for different screens of devices is the must now-a-days.
There are plenty of frameworks that can be used to get the job done, but if you make a responsive layout without any framework, you will have full control on your layout, every time you can make changes to that according to your choice.
In a couple of tutorials, we are going to make a responsive menu, sidebar, and a footer for a website.
Finally, you will be able to HACK NASA.
Mmmmm I’m joking just for your smile.
Let’s start to create a responsive menu only in HTML and CSS in just two easy steps:
First step: working with HTML
Second step: working with CSS.
After naming the file copy and paste the bellow code in the file that you have just created, and that’s it.
<prev>
<html>
<head>
<meta
charset="utf-8">
<meta
name="viewport" content="width=device-width,
initial-scale=1">
<title>Rannaweb</title>
<!—if you
are not connected to the internet, you will not see the bars icon in the mobile
version of the menu -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link
rel="stylesheet" type="text/css"
href="assets\style.css">
</head>
<body>
<div
class="header-menu">
<nav>
<input
type="checkbox" id="check"></input>
<label
for="check" class="checkbutton">
<i class="fa
fa-bars"></i>
</label>
<div
class="logo"><p>Your Website </p></div>
<ul>
<li><a
href="#” class="active">Home</a></li>
<li><a
href="#">Services</a></li>
<li><a
href="#">Privacy</a></li>
<li><a
href="#">Terms & Condition</a></li>
<li><a
href="#">About</a></li>
</ul>
</nav>
</div>
</pre>
Well done! You have completedthe first step. Now let’s go to the second step(CSS)
Comments