Search
 
SCRIPT & CODE EXAMPLE
 

CSS

html css navbar with dropdown

<!DOCTYPE html>
<html lang="en">

<head>
    <style>
        .navbar a {
            float: left;
        }
        .dropdown {
            float: left;
            overflow: hidden;
        }

        .dropdown-content a {
            float: none;
            display: block;
        }
        
        /* hide the dropdown content */
        .dropdown-content {
            display: none;
            position: absolute;
            z-index: 1;
        }

        /* Show the dropdown menu on hover */
        .dropdown:hover .dropdown-content {
            display: block;
        }
    </style>
</head>

<body>
    <div class="navbar">
        <a href="#home">Home </a>
        <a href="#news">News </a>
        <div class="dropdown">
            <button class="dropbtn">Dropdown</button>
            <div class="dropdown-content">
                <a href="#">Link 1</a>
                <a href="#">Link 2</a>
            </div>
        </div>
    </div>
</body>

</html>
Comment

PREVIOUS NEXT
Code Example
Css :: Bootstrap default accordion arrow icon change 
Css :: html table scrollable body fixed header 
Css :: rotate keyframe animation 
Css :: html invisible hr 
Css :: css for disabled button 
Css :: table properties css 
Css :: image with background color css 
Css :: sql file extension 
Css :: flex align self 
Css :: how to center with position fixed 
Css :: make input invisible but clickable css 
Css :: collapse border css 
Css :: how to change highlight color on website 
Css :: install tailwind css 
Css :: how to css in jquery 
Css :: css grid 1 row 2 columns 
Css :: css media queries laptop 
Css :: setting z index on before after pseudo classes 
Css :: mysql_config not found 
Css :: on hover css 
Css :: css code for green 
Css :: bootstrap 4 scss angular 8 
Css :: text-transform 
Css :: how to put an element in front 
Css :: add tailwindcss to angular 
Css :: change image color in bootstrap card on hover css 
Css :: html css circle progress bar 
Css :: place two div elements next to each other 
Css :: grid-template-columns 
Css :: bounced in css animation 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =