Jump to content
  • 0

2 колонки


kamaz6141
 Share

Question

Вот опять не пойму как быть:

конструкция вот такая


<div id='content'>
<div id='left'></div>
<div id='right'></div>
</div>


#content {
height: auto;
border: 1px dashed red;

}
#left {
float: left;
border: 1px dashed red;
width: 720px;
min-height: 400px;
}
#right {
border: 1px dashed red;
width: 230px;
min-height: 200px;
float: right;

}

как сделать чтобы блоки left и right были внутри блока content, и высота блока content зависила от высоты блоков left и right?

заранее спасибо

Edited by kamaz6141
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

overflow: hidden;

и height: auto вам вообще не нужно. Так же уберите у блока right float: right;, а вместо него впишите margin-left: на ширину вашей левой колонки + желаем отступ. Так же советую использовать такие кавычки " вместо таких '.

Edited by tini.kRyptoNite
Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy