Full Horizontal
How do I make an full horizontal?
Part of my Responsive Menu Concepts article on CSS-Tricks.. What is a full horizontal? How do you make a full horizontal? This script and codes were developed by Tim Pietrusky on 20 June 2022, Monday.
Full Horizontal - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Full Horizontal</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import url(http://fonts.googleapis.com/css?family=Cantora+One);
* { box-sizing: border-box;
}
html,
body { width: 100%; height: 100%;
}
body { background: url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/nasty_fabric.png); margin: .5em; font: 1em 'Cantora One', sans-serif;
}
nav[role="full-horizontal"] { width: 100%;
}
nav[role="full-horizontal"] ul { width: 100%; list-style: none;
}
nav[role="full-horizontal"] ul > li { position: relative; float: left; padding: .25em 1em; margin: 1.25em 1em; text-transform: uppercase; cursor: pointer; background: rgba(255, 255, 255, 0.8); text-align: center; border-radius: .75em; transition-duration: .3s; transition-timing-function: ease-in-out; transition-property: background, color, padding, border-radius; box-shadow: 0.1em -0.1em 0 0.1em rgba(0, 0, 0, 0.2), inset 0 0 0 0.15em rgba(0, 0, 0, 0.4), -0.1em 0.1em 0 0.1em rgba(0, 0, 0, 0.2);
}
nav[role="full-horizontal"] ul > li:after { position: absolute; z-index: -1; content: ""; right: 0; border-radius: 50%; box-shadow: 1em 1em 0 2em rgba(255, 255, 255, 0.5);
}
nav[role="full-horizontal"] ul > li:last-child:after { box-shadow: none;
}
nav[role="full-horizontal"] ul > li:hover { background-color: rgba(251, 93, 0, 0.8); padding-left: 3em;
}
nav[role="full-horizontal"] ul > li:hover > a { color: #fff;
}
nav[role="full-horizontal"] ul > li > a { color: #333; text-decoration: none; font-size: 1.4em; transition: color .3s ease-in-out;
}
/* small screens */
@media screen and (max-width: 44em) { body { margin: 1.5em 0; } nav[role="full-horizontal"] ul { padding: 0 .5em; } nav[role="full-horizontal"] ul > li { width: 100%; padding: .45em .25em; margin: 0 0 .55em 0; } nav[role="full-horizontal"] ul > li:after { box-shadow: none; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <nav role="full-horizontal"> <ul> <li><a href="#">Stream</a></li> <li><a href="#">Lab</a></li> <li><a href="#">Projects</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul>
</nav> <script src="js/index.js"></script>
</body>
</html>
Full Horizontal - Script Codes CSS Codes
@import url(http://fonts.googleapis.com/css?family=Cantora+One);
* { box-sizing: border-box;
}
html,
body { width: 100%; height: 100%;
}
body { background: url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/nasty_fabric.png); margin: .5em; font: 1em 'Cantora One', sans-serif;
}
nav[role="full-horizontal"] { width: 100%;
}
nav[role="full-horizontal"] ul { width: 100%; list-style: none;
}
nav[role="full-horizontal"] ul > li { position: relative; float: left; padding: .25em 1em; margin: 1.25em 1em; text-transform: uppercase; cursor: pointer; background: rgba(255, 255, 255, 0.8); text-align: center; border-radius: .75em; transition-duration: .3s; transition-timing-function: ease-in-out; transition-property: background, color, padding, border-radius; box-shadow: 0.1em -0.1em 0 0.1em rgba(0, 0, 0, 0.2), inset 0 0 0 0.15em rgba(0, 0, 0, 0.4), -0.1em 0.1em 0 0.1em rgba(0, 0, 0, 0.2);
}
nav[role="full-horizontal"] ul > li:after { position: absolute; z-index: -1; content: ""; right: 0; border-radius: 50%; box-shadow: 1em 1em 0 2em rgba(255, 255, 255, 0.5);
}
nav[role="full-horizontal"] ul > li:last-child:after { box-shadow: none;
}
nav[role="full-horizontal"] ul > li:hover { background-color: rgba(251, 93, 0, 0.8); padding-left: 3em;
}
nav[role="full-horizontal"] ul > li:hover > a { color: #fff;
}
nav[role="full-horizontal"] ul > li > a { color: #333; text-decoration: none; font-size: 1.4em; transition: color .3s ease-in-out;
}
/* small screens */
@media screen and (max-width: 44em) { body { margin: 1.5em 0; } nav[role="full-horizontal"] ul { padding: 0 .5em; } nav[role="full-horizontal"] ul > li { width: 100%; padding: .45em .25em; margin: 0 0 .55em 0; } nav[role="full-horizontal"] ul > li:after { box-shadow: none; }
}
Full Horizontal - Script Codes JS Codes
/** Full Horizontal # What? # Part of my "Responsive Menu Concepts" article on CSS-Tricks http://css-tricks.com/responsive-menu-concepts # 2012 by Tim Pietrusky # timpietrusky.com
**/
Developer | Tim Pietrusky |
Username | TimPietrusky |
Uploaded | June 20, 2022 |
Rating | 4 |
Size | 4,103 Kb |
Views | 64,768 |
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!
Name | Size |
FlatUI Checkout concept | 6,972 Kb |
ID Card - Skills | 5,680 Kb |
Icon Fonts - CSS-Loader | 2,940 Kb |
Kudos Please | 6,624 Kb |
Custom Dropdown | 4,878 Kb |
Icon Fonts - SocialCount meets Style | 3,713 Kb |
Blurry Sweetness | 4,034 Kb |
Colorful stripes | 2,652 Kb |
Select | 4,112 Kb |
Icon Fonts - Enhanced lists | 5,108 Kb |
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!
Name | Username | Size |
Slider | Mohammed-fawzy | 2,634 Kb |
Lightning | Akm2 | 19,150 Kb |
Flat iOS 7 Safari Icon | Rss | 3,332 Kb |
SVG Animation | Pollardld | 3,133 Kb |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
IbrahimJabbari-Effect21 | Ibrahimjabbari | 1,882 Kb |
Display properties | Hamzaerbay | 1,886 Kb |
Subtle site navigation with description | Necks | 3,206 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Sitemap generator for Sharepoint | Gyusza | 2,518 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!