Jump to content
  • 0

3 колонки % const %


акрил
 Share

Question

Здравствуйте!

Подскажет, пожалуйста, как можно получить такую резиновую верстку: 3 колонки % const %

например так не работает, поскольку left-block и right-block блоки набегают на central-block-const при масштабировании браузера

body {
margin: 0px;
padding: 0px;
background-color: #f0f0f0;
}

#main {
border: 1px solid #f00;
width:100;
padding:0px;
margin:0px;
position:relative;
overflow:hidden;
}

#central-block-const {
border: 1px solid #ff0;
width:100px;
margin: 0px auto;
}

#left-block {
border: 1px solid #ff0;
width: 40%;
position:absolute;
top:0px;
left:0px;
margin:0px;
padding: 5px;
}


#right-block {
border: 1px solid #ff0;
width: 40%;
position:absolute;
top:0px;
right:0px;
margin:0px;
padding: 5px;
}

<div id="main">
<div id = "central-block-const"><BR><BR><BR><BR><BR><BR></div>
<div id="left-block">
left blockleft blockleft blockleft blockleft blockleft block
</div>

<div id="right-block">
left blockleft blockleft blockleft blockleft blockleft block
</div>

</div>

Спасибо!

Edited by акрил
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

ваши условия имеют смысл только при конкретной ширине окна браузера.

Возможно, боковые колонки должны иметь не процентную ширину, а занимать доступное место до края окна?

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