JSFiddle - React, Tailwind, and code Playground
by Kocsten
HTML
<nav>
<label for="drop" class="katelovtesa">Menu</label>
<input type="checkbox" id="drop" />
<ul class="ranitasem">
<li><a href="#">Home</a></li>
<li>
<!-- First Tier Drop Down -->
<label for="drop-1" class="katelovtesa">Скрипты +</label>
<a href="#">Шаблоны</a>
<input type="checkbox" id="drop-1"/>
<ul>
<li><a href="#">ZORNET.RU</a></li>
<li><a href="#">ZORNET.RU</a></li>
<li><a href="#">ZORNET.RU</a></li>
</ul>
</li>
<li>
<!-- First Tier Drop Down -->
<label for="drop-2" class="katelovtesa">Раздел +</label>
<a href="#">Дизайн</a>
<input type="checkbox" id="drop-2"/>
<ul>
<li><a href="#">ZORNET.RU</a></li>
<li><a href="#">ZORNET.RU</a></li>
<li>
<input type="checkbox" id="drop-3"/>
</li>
</ul>
</li>
<li><a href="#">Скрипты</a></li>
<li><a href="#">Шаблоны</a></li>
<li><a href="#">Меню uCoz</a></li>
</ul>
</nav>
CSS
body {
background: #212121;
font-size:22px;
line-height: 32px;
color: #ffffff;
margin: 0;
padding: 0;
word-wrap:break-word !important;
font-family: 'Open Sans', sans-serif;
}
h1 {
font-size: 60px;
text-align: center;
color: #FFF;
}
h3 {
font-size: 30px;
line-height: 34px;
text-align: center;
color: #FFF;
}
h3 a {
color: #FFF;
}
a {
color: #FFF;
}
h1 {
margin-top: 100px;
text-align:center;
font-size:60px;
line-height: 70px;
font-family: 'Bree Serif', 'serif';
}
#container {
margin: 0 auto;
max-width: 890px;
}
p {
text-align: center;
}
.katelovtesa,
[id^=drop] {
display: none;
}
/* Giving a background-color to the nav container. */
nav {
margin:0;
padding: 0;
background-color: #254441;
}
#logo {
display: block;
padding: 0 30px;
float: left;
font-size:20px;
line-height: 60px;
}
/* Since we'll have the "ul li" "float:left"
* we need to add a clear after the container. */
nav:after {
content:"";
display:table;
clear:both;
}
/* Removing padding, margin and "list-style" from the "ul",
* and adding "position:reltive" */
nav ul {
float: right;
padding:0;
margin:0;
list-style: none;
position: relative;
}
/* Positioning the navigation items inline */
nav ul li {
margin: 0px;
display:inline-block;
float: left;
background-color: #254441;
}
nav a {
display: block;
padding: 14px 17px;
color: #fdf8f8;
font-size: 18px;
text-decoration: none;
}
nav ul li ul li:hover { background: #000000; }
/* Background color change on Hover */
nav a:hover {
background-color: #000000;
}
/* Hide Dropdowns by Default
* and giving it a position of absolute */
nav ul ul {
display: none;
position: absolute;
/* has to be the same number as the "line-height" of "nav a" */
top: 60px;
}
/* Display Dropdowns on Hover */
nav ul li:hover > ul {
display:inherit;
}
/* Fisrt Tier Dropdown */
nav ul ul li {
width:170px;
float:none;
display:list-item;
position: relative;
}
/* Second, Third and more...