Found 8591 Articles for Front End Technology

How to hide a navigation menu on scroll down with CSS and JavaScript?

Aman Kumar
Updated on 19-Aug-2024 16:14:14

6K+ Views

To hide a navigation menu on scroll down with CSS and JavaScript, user should have basic knowledge of javascript conditional statement and CSS. We will be creating the navigation menu using HTML, style the navigation menu using CSS and use Javascript to hide navigation menu while scrolling down. We are having a navigation menu with textual content, our task is to hide the navigation menu while scrolling down. In this article, we will be implementing following steps to hide a navigation menu on scroll down with CSS and JavaScript: Creating Structure of Navigation Menu Using ... Read More

How to create a "fixed" menu with CSS?

AmitDiwan
Updated on 17-Nov-2023 10:38:18

725 Views

To create a fixed menu on a web page, use the position property and set the value fixed. Set the width to 100% using the width property. Set the Navigation Menu Use the element to create the navigation menu on a web page. The links are set using the and the href attribute − Home Login Register Contact Us More Info Style the Navigation Menu We have positioned the menu as fixed using the position property with the value ... Read More

How to create a navigation bar with equal-width navigation links with CSS?

AmitDiwan
Updated on 03-Apr-2020 10:47:08

1K+ Views

Following is the code to create a navigation bar with equal-width navigation links.−Example Live Demo Document body{    margin:0px;    margin-top:60px;    padding: 0px; } *,*::before,*::after{    box-sizing: border-box; } nav{    position: fixed;    top: 0;    width: 100%;    background-color: rgb(39, 39, 39);    overflow: auto;    height: auto; } .links {    width: 20vw;    padding: 17px;    display: inline-block;    text-align: center;    color: rgb(178, 137, 253);    text-decoration: none;    font-size: 17px; } .links:hover {    background-color: rgb(100, 100, 100); } .selected{    background-color: rgb(0, 18, 43); } Home Login Register Contact Us More Info Equal width navigation menu OutputThe above code will produce the following output −

How to create a navigation bar with a centred link/logo with CSS?

AmitDiwan
Updated on 03-Apr-2020 10:43:53

410 Views

Following is the code to produce a navigation bar with a centered link/logo −Example Live Demo Document body{    margin:0px;    margin-top:60px;    padding: 0px; } nav{    position: fixed;    top:0;    width: 100%;    background-color: rgb(251, 255, 196);    overflow: auto;    height: auto; } .left-links{    display: inline-block;    position: absolute;    left: 0; } .right-links{    display: inline-block;    position: absolute;    right: 0; } .center-links{    display: inline-block;    margin-left: 50%; } .links {    display: inline-block;    text-align: center;    padding: 14px;    color: rgb(0, 0, 0);    text-decoration: none;    font-size: 17px;    font-weight: bolder; } .links:hover {    border-bottom: 2px solid purple; } .selected{    border-bottom: 2px solid purple; } Login Register Home Contact Us More Info Hover on the above links OutputThe above code will produce the following output−

How to create a navigation bar with left-aligned and right-aligned links with CSS?

AmitDiwan
Updated on 05-Sep-2024 17:13:43

11K+ Views

To create a navigation bar with left-aligned and right-aligned links with CSS, user should have a basic understanding of CSS flexbox. First, we will create the structure of navigation bar having five links using HTML, then we will use CSS to design the navigation bar and align the links on the left and right sides of the navigation bar, and apply flexbox properties to ensure proper positioning of links. We are having a navigation menu containing five links, our task is to create a navigation bar with left-aligned and right-aligned links with CSS. In this article, we will be implementing ... Read More

How to create bottom bordered (underline) navigation links with CSS?

AmitDiwan
Updated on 14-Dec-2023 15:56:20

2K+ Views

To create underlined navigation links, use the border-bottom property in CSS. The border-bottom is a shorthand for the width, style, and color of the bottom border. These links will be displayed underlined on hover as well using the :hover selector. With that, the selected link will also get underlined. Let us see how to create bottom bordered i.e., underlined navigation links on a web page with HTML and CSS. Create the navigation links Use the element to create the navigation links on a web page − Home Login ... Read More

How to create a responsive bottom navigation menu with CSS and JavaScript?

Aman Kumar
Updated on 19-Dec-2022 14:14:42

1K+ Views

In this article we are going to discuss how to create a responsive bottom navigation menu with CSS and JavaScript. Usually once you create a web page, when you alter the size of the page, some of the contents of the page will be hidden. A responsive page is the one which adjusts the contents of the page as we change the dimensions of the page. To create a responsive navigation menu, we have to use CSS and JavaScript. The responsive menu resizes the browser menu to see how the navigation menu works on small and mobile−size displays. In short ... Read More

How to create a bottom navigation menu with CSS?

AmitDiwan
Updated on 27-Oct-2023 11:22:11

1K+ Views

To create a bottom navigation menu, set the nav element with the bottom and position properties. The position property is set to fixed and the bottom is set to 0px. The bottom navigation menu looks like the following on a web page. The menu is placed is fixed in the bottom as shown below − Create a Navigation Menu First, set the navigation menu with some menus − Home Login Register Contact Us More Info Style ... Read More

How to create a vertical menu with CSS?

AmitDiwan
Updated on 14-Dec-2023 12:32:23

1K+ Views

Vertical menus on a web page are mainly placed on the left or the right. These left or right menus are vertically aligned to make it easier for users to navigate or click them. To create a vertical menu, set a container and within that set the menu links. The display property is to be set as block to let the menu appear vertically. Let us see how to create a vertical menu with HTML and CSS. Set a container for the menu A div is set for the menu. The menu links are added using the element with ... Read More

How to create a horizontal scrollable menu with CSS?

AmitDiwan
Updated on 03-Apr-2020 09:19:49

711 Views

Following is the code to produce a horizontal scrollable menu with CSS −Example Live Demo Document body{    margin:0px;    margin-top:10px;    padding: 0px; } nav{    width: 100%;    background-color: rgb(39, 39, 39);    overflow: auto;    height: auto;    white-space: nowrap; } .links {    display: inline-block;    text-align: center;    padding: 14px;    color: rgb(178, 137, 253);    text-decoration: none;    font-size: 17px; } .links:hover {    background-color: rgb(100, 100, 100); } .selected{    background-color: rgb(0, 18, 43); } Home Login Register Contact Us More Info Our Social Links Visit Us OutputThe above code will produce the following output −On resizing the browser window horizontal scrolling will be seen −

Advertisements