ZIROKUL
@ZIROKUL

Как сделать выпадающей список на всю ширину?

Есть выпадающий список ( меню_1, меню_2) при нажатии на меню 2 текст появляется но с отступом с лева. Как сделать что бы все выпадающие списки отображались на всю ширину синей полосы меню без отступа.
a5088c8bd5cd4bfe903beef2ef010c34.png
<div class="container">
		<div class="row">
			<div class="blok_doc_info">
				<nav>
					<ul class="doc_mmnu">
						<li class="doc_clik">
							<a class="mmn_clik" href="#">Menu 1</a>
						<div class="hidder">
							<div class="container">
								<div class="row">
								<span><i class="fa fa-bullhorn"></i></span>
								<a href="">Train Travel On Track For Safety</a> <span><i class="fa fa-calendar"></i>17 Jun 2016</span>
									<p>
									Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
									</p>
								</div>
							</div>
						</div>
						</li>
					<li class="doc_clik">

					</ul>
				</nav>
			</div>
			

		</div>
	</div>


.blok_doc_info {
	width: 100%;
	height: 400px;
	/*background-color: #c2c2c2;*/
}
.doc_mmnu{
	background-color: #6388b7;
	height: 50px;
	width: 1168px;
	padding: 10px 0 0 0;
}
.doc_mmnu li {
	float: left;
	padding: 0 0 10px 0;
	position: relative;
}
.doc_mmnu li a {
 	float: left;
	height: 25px;
		color: #fff;
	padding: 0 25px;
 }
.hidder{
	list-style: none;
	    margin: 0;
	    padding: 0;
	    display: none;
	    position: absolute;
	    top: 40px;
	    left: 0;
	    z-index: 99999;
	    background: #f9f9f9;
	    -moz-border-radius: 5px;
	    border-radius: 5px;
	    width: 1100px;
}
.hidder a{
	color:#000000 !important;
	font-weight: bold;
}
.doc_mmnu ul a 
	{
	padding: 10px;
	height: auto;
	line-height: 1;
	display: block;
	white-space: nowrap;
	float: none;
	text-transform: none;
	
}
  • Вопрос задан
  • 482 просмотра
Решения вопроса 1
webinar
@webinar
Учим yii: https://youtu.be/-WRMlGHLgRg
надо явно указать position:relative; только тому предку, который во всю ширину. В Вашем случае или для ul или для nav. Тогда абсолютное позиционирование выпадающего блока будет происходить относительно его, а не li. И соответственно left:0; приведет к нужному результату
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
webirus
@webirus
Тыжверстальщик! Наверстай мне упущенное...
ul, ul li {
margin: 0;
padding: 0;
}
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы