Jump to content
  • 0

Растянуть блок меню до самого футера


MariAnette
 Share

Question

Здравствуйте! У меня такой вопрос: есть блок меню с фоном, нужно растянуть его вниз, до самого футера. Сейчас он растягивается только содержимым. Пробовала писать

div#menu{position: relative; top:0; bottom: 0;  }

Но это ничего не дало. Если кто-либо сталкивался с подобной проблемой - подскажите! :D

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Документ без названия</title>
<style>
html,body {
margin:0;
padding:0;
width:100%;
height:100%;
}
#left_blok {
border:#E2E2E2 solid 2px;
background: #72BBDB;
width:15%;
position:absolute;
top:0px;
left:0;
bottom:0;
}
ul {
padding:5px 5px 5px 0px;
margin-left:5px;
}
li {
margin:5px 2px 5px 2px;
}
#left_nav LI a {
display: block;
background-color:#72BBDB;
font: bold 12px Verdana;
text-decoration: none;
color: #FFFFFF;
height:1%;
}
#left_nav LI a:hover {
background-color:#A8D5EC;
color: #FFFFFF;
}
</style>
</head>
<body>
<div id="left_blok">
<ul id="left_nav">
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
</ul>
</div>
</body>
</html>

Link to comment
Share on other sites

  • 0

Спасибо rus, но я немного другое имела ввиду. Футер расположен 'ниже' чем нижняя граница окна браузера, и при прокручивании странички вниз блок меню как-бы'пустой', то есть растянут только на высоту окна браузера. Надо чтобы он при прокручивании вниз растягивался тоже (если это возможно). Вот ваш же пример с моими дополнениями:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Документ без названия</title>
<style>
html,body {
margin:0;
padding:0;
width:100%;
height:100%;
}
#left_blok {
border:#E2E2E2 solid 2px;
background: #72BBDB;
width:15%;
position:absolute;
top:0px;
left:0;
bottom:0;
}
ul {
padding:5px 5px 5px 0px;
margin-left:5px;
}
li {
margin:5px 2px 5px 2px;
}
#left_nav LI a {
display: block;
background-color:#72BBDB;
font: bold 12px Verdana;
text-decoration: none;
color: #FFFFFF;
height:1%;
}
#left_nav LI a:hover {
background-color:#A8D5EC;
color: #FFFFFF;
}
#content {position:absolute; width: 45%;
top:0px;
left:15%;
bottom:0;}
</style>
</head>
<body>
<div id="left_blok">
<ul id="left_nav">
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
</ul>
</div><div id="content"><p>1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.

very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column

fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very

column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p>
<p>1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.

very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column

fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very

column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very</p>
<p>1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.

very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column

fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very

column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very</p>
</div>
</body>
</html>

Link to comment
Share on other sites

  • 0

есть один вариант, но он не очень гуд, но работать будет, а вообще лучше с вертикальным скроллом сделать:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Документ без названия</title>
<style>
html, body {
margin:0;
padding:0;
width:100%;
height:100%;
}
#left_blok {
border:#E2E2E2 solid 2px;
background: #72BBDB;
width:15%;
position:absolute;
top:0px;
left:0;
bottom:-100%;
}
ul {
padding:5px 5px 5px 0px;
margin-left:5px;
}
li {
margin:5px 2px 5px 2px;
}
#left_nav LI a {
display: block;
background-color:#72BBDB;
font: bold 12px Verdana;
text-decoration: none;
color: #FFFFFF;
height:1%;
}
#left_nav LI a:hover {
background-color:#A8D5EC;
color: #FFFFFF;
}
#content {
position:absolute;
width: 45%;
top:10px;
left:20%;
bottom:0;
min-height: 100%;
}
#wrap {
height:auto !important;
min-height:100%;
height:100%;
position:relative;
min-width:800px;
}
</style>
</head>
<body>
<div id="wrap">
<div id="left_blok">
<ul id="left_nav">
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
<li><a href="test.html" title="Тестовая страница">Тестовая страница</a></li>
</ul>
</div>
<div id="content">
<p>1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p>
</div>
</div>
</body>
</html>

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