Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="catalog btn">
							<span>Каталог</span> <img src="assets/img/bars.png" alt="">
							<div class="catalog-dropdown">
								<ul class="catalog-dropdown__list">
										<li>
											<a href="#">Бытовая химия</a>
											<div class="catalog-dropdown__submenu">
												<div class="catalog-dropdown__submenu-list-cleaning-product">
													<div class="product">
														<a href="#">Средства для ванной</a>
														<a href="#">Средства для туалета</a>
														<a href="#">Средства для стирки</a>
														<a href="#">Средства для чистки кухни</a>
														<a href="#">Средства для мыть посуды</a>
													</div>
													<div class="count-product">
														<span>(33)</span>
														<span>(56)</span>
														<span>(21)</span>
														<span>(3)</span>
														<span>(94)</span>
													</div>
												</div>
												<div class="catalog-dropdown__submenu-list-cleaning-product">
													<div class="product">
														<a href="#">Освежители воздуха</a>
														<a href="#">Средства для стекол, зеркал</a>
														<a href="#">Средства против насекомых</a>
														<a href="#">Средства для мытья полов</a>
														<a href="#">Средства для ковров</a>
													</div>
													<div class="count-product">
														<span>(47)</span>
														<span>(1)</span>
														<span>(21)</span>
														<span>(45)</span>
														<span>(26)</span>
													</div>
												</div>
												<div class="catalog-dropdown__submenu-list-cleaning-product">
													<div class="product">
														<a href="#">Средства для мебели</a>
														<a href="#">Универсальные чистящие средства</a>
														<a href="#">Универсальные порошки</a>
														<a href="#">Жидкий порошок</a>
														<a href="#">Средства для стирки</a>
													</div>
													<div class="count-product">
														<span>(38)</span>
														<span>(65)</span>
														<span>(43)</span>
														<span>(21)</span>
														<span>(1)</span>
													</div>
												</div>
											</div>
										</li>
										<li>
											<a href="#">Мебель </a>
											<div class="catalog-dropdown__submenu">
												<div class="catalog-dropdown__submenu-list-furniture">
													<div class="furniture">
														<a href="#">Стулья</a>
														<a href="#">Табуретки</a>
														<a href="#">Кресло</a>
													</div>
													<div class="count-furniture">
														<span>(38)</span>
														<span>(65)</span>
														<span>(1)</span>
													</div>
												</div>
												<div class="catalog-dropdown__submenu-list-furniture">
													<div class="furniture">
														<a href="#">Столы</a>
														<a href="#">Стол-книга</a>
														<a href="#">Копьютерный стол</a>
													</div>
													<div class="count-furniture">
														<span>(38)</span>
														<span>(21)</span>
														<span>(1)</span>
													</div>
												</div>
												<div class="catalog-dropdown__submenu-list-furniture">
													<div class="furniture">
														<a href="#">Диваны</a>
														<a href="#">Кровати</a>
														<a href="#">Диван-трансформер</a>
													</div>
													<div class="count-furniture">
														<span>(38)</span>
														<span>(65)</span>
														<span>(1)</span>
													</div>
												</div>
											</div>
										</li>
										<li><a href="#">Электротехника </a></li>
										<li><a href="#">Бытовая химия </a></li>
										<li><a href="#">Мебель </a></li>
										<li><a href="#">Электротехника</a></li>
								</ul>
								<div class="count">
									<span>(86)</span>
									<span>(58)</span>
									<span>(13)</span>
									<span>(25)</span>
									<span>(10)</span>
									<span>(34)</span>
								</div>		
							</div>
              
            
!

CSS

              
                /* Модальное окно Каталога */
.catalog {
	position: relative;
}
.catalog-dropdown:before {
	content: " ";
	position: absolute;
	bottom: 100%;
	left: 0;
	width: 100%;
	height: 45px;
}
.catalog-dropdown {
	position: absolute;
	top: 45px;
	left: 0;
	z-index: 1;
	background-color: #f0f0f0;
	width: 370px;
	border-radius: 0 0 5px 5px;
}
.catalog-dropdown {
	opacity: 0;
	margin-top: -10px;
}
.catalog:hover .catalog-dropdown{
	opacity: 1;
	transition: .3s;
	margin: 0;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}
.catalog-dropdown ul li a{
	color: black;
}
.catalog-dropdown ul li a:hover{
	color: #005dc6;
}
.catalog-dropdown ul li {
	padding: 10px 0;
	margin-left: -15px;
}
.catalog-dropdown ul li:hover {
	background-color: #fff;
	border-radius: 5px;
}
.catalog-dropdown li {
	list-style-type: none;
}
.catalog-dropdown li::before {
	color: blue;
	content: "•";
	padding-right: 10px;
}
.count{
	display: inline-flex;
	flex-direction: column;
	justify-content: space-evenly;
	padding-right: 10px;
	font-size: 12px;
	color: blue;
}

/* SUBMENU catalog */
.catalog-dropdown__list li a{
	position: relative;
}
.catalog-dropdown__submenu::before {
	content: " ";
	position: absolute;
	right: 100%;
	top: 0;
	width: 45px;
	height: 100%;
}
.catalog-dropdown__submenu {
	position: absolute;
	top: 0;
	left: 385px;
	width: 925px;
	background-color: #f0f0f0;
	z-index: inherit;
	margin-left: -30px;
}
.catalog-dropdown__submenu {
	opacity: 0;
	margin-left: -50px;
}
.catalog-dropdown__list li:hover .catalog-dropdown__submenu {
	opacity: 1;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	border-radius: 0 0 5px 5px;
	transition: .4s;
	margin: 0;
}

/* CТИЛИ КОЛОНОК В ПОДМЕНЮ*/
/* Чистящие средства */

.catalog-dropdown__submenu-list-cleaning-product {
	display: flex;
	flex-direction: row;
	margin: 15px 15px;
	box-sizing: border-box;
}
.catalog-dropdown__submenu-list-cleaning-product a:nth-child(1){
	font-weight: 600;
	padding-bottom: 15px;
}
.catalog-dropdown__submenu-list-cleaning-product a{
	padding: 5px 0;
}
.product {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.count-product {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	margin-left: 25px;
	color: blue;
	font-size: 12px;
}
.count-product span:nth-child(1) {
	font-weight: 600;
	padding-bottom: 10px;
}

/* Мебель */

.catalog-dropdown__submenu-list-furniture {
	display: flex;
	flex-direction: row;
	margin: 15px 20px;
}
.catalog-dropdown__submenu-list-furniture a {
	font-weight: 600;
	padding: 5px 0;
}
.catalog-dropdown__submenu-list-furniture a:hover {
	background-color: #ecedf1;
}
.furniture {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.count-furniture {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	color: blue;
	font-size: 12px;
	font-weight: bold;
	margin-left: 60px;
}
              
            
!

JS

              
                
              
            
!
999px

Console