You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
ros.pro
Как сделать, чтобы при увеличении размера контента дива, он увеличивался бы по высоте, если в ксс указан overflow: hidden ?
overflow: visible не подходит, т.к когда я его указываю, вся верстка "валится" в мозиле и опере.
зы: Это надо сделать в дивах, которые поочередно расположены по горизонтали...
Или альтернативный вопрос: как сделать чтобы верстка не валилась при overflow: visible ? =)
.block_main{
position: relative;
margin-top: 5px;
margin-bottom: 5px;
}
.block_top_1{
margin-left: -10px;
margin-top: -5px;
margin-bottom: 5px;
height: 32px;
line-height: 18px;
overflow: hidden;
background: #FFF;
border: 2px solid #f6f6f6;
border-bottom: 1px solid #dddddd;
}
.block_content{
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
background: #f6f6f6;
_display: inline-block;
overflow: hidden;
position: relative;
border: 1px solid #dddddd;
font-family: Arial;
font-weight: normal;
font-size: 11px;
color: #000;
}
.block_content_2{
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
overflow: hidden;
float: left;
width: 50%;
margin-right: 3px;
_margin-right: 0px;
background: #f6f6f6;
position: relative;
border: 1px solid #dddddd;
font-family: Arial;
font-weight: normal;
font-size: 11px;
color: #000;
}
<div class="block_main">
<div class="block_top">Последние новости</div>
<div class="block_content_2" style="height: 150px; margin-bottom: 3px;">
<div class="block_top_1"><img src="themes/site/images/news_pic.gif" align="left" hspace=5><a href="http://localhost/bb/index.php" id="link_menu"></a></div>
</div>
<div class="block_content" style="height: 150px; margin-bottom: 3px;">
<div class="block_top_1"><img src="themes/site/images/news_pic.gif" align="left" hspace=5><a href="http://localhost/bb/index.php" id="link_menu"></a></div>
</div>
</div>
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.