Full Horizontal

Developer
Size
4,103 Kb
Views
64,768

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 Previews

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
**/
Full Horizontal - Script Codes
Full Horizontal - Script Codes
Home Page Home
Developer Tim Pietrusky
Username TimPietrusky
Uploaded June 20, 2022
Rating 4
Size 4,103 Kb
Views 64,768
Do you need developer help for Full Horizontal?

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!

Tim Pietrusky (TimPietrusky) Script Codes
Create amazing blog posts 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!