Active Nav Item On Top

Developer
Size
1,661 Kb
Views
38,456

How do I make an active nav item on top?

This answers stack overflow question: http://stackoverflow.com/questions/36826423/unordered-list-list-item-position. What is a active nav item on top? How do you make a active nav item on top? This script and codes were developed by Andy Hoffman on 24 August 2022, Wednesday.

Active Nav Item On Top Previews

Active Nav Item On Top - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Active Nav Item On Top</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ul> <li>Item 1</li> <li class="active">Item 2</li> <li>Item 3</li>
</ul>
</body>
</html>

Active Nav Item On Top - Script Codes CSS Codes

* { margin: 0; padding: 0;
}
ul { width: 10em; border: 1px solid gray; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column;
}
li { list-style: none; padding: 1em; border-bottom: 1px solid gray;
}
li[class=active] { order: -1; background: rgba(255, 0, 0, 0.3);
}
li[class=active]:before { content: "I am active =>"; left: -7em; position: absolute;
}
Active Nav Item On Top - Script Codes
Active Nav Item On Top - Script Codes
Home Page Home
Developer Andy Hoffman
Username antibland
Uploaded August 24, 2022
Rating 3
Size 1,661 Kb
Views 38,456
Do you need developer help for Active Nav Item On Top?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Andy Hoffman (antibland) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!