View Full Version : vertical CSS menu problem
bigcy
January 8th, 2007, 08:49 AM
hello all,
I am making a site where there is a vertical CSS menu on the left hand of the page
The structure of the page is
:top:
:content : CSS menu :
:bottom:
My problem is the menu is not occupaying the full space of the middle section
Can anyone help me to overcome this problem
Im attaching the Html file for ur reference
Thanks in advance
Abus
January 8th, 2007, 10:05 AM
As far as i see there is nothing wrong since your menu's content is smaller than the middle content. If you view your page in a lower resolution you will see that the menu is nearly occupies the middle content
bigcy
January 8th, 2007, 12:26 PM
hi Abus
I need the left hand side menu should touch the bottom line of the page , so that there should not be any gap between the middle content & bottom line
regards
bigcy
January 9th, 2007, 01:19 AM
anyone here to help me ?
fluid_tw0
January 9th, 2007, 01:40 AM
what gap? - please show me the gap, and i'll fill it :P
bigcy
January 9th, 2007, 03:08 AM
I want as per attached image
fluid_tw0
January 9th, 2007, 07:25 AM
there's no white area visible in FF 2.0
bigcy
January 9th, 2007, 08:18 AM
plz check the attached file again
bigcy
January 11th, 2007, 02:38 AM
Can Anybody help me ?
simplistik
January 11th, 2007, 09:48 AM
can you publish the page on the internet please. most of us won't download your zip. or post the code using the
or
please.
bigcy
January 13th, 2007, 07:39 AM
here is the code :
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>menu page</title>
<style type="text/css">
html, body
{
min-height:100%;
margin:0;
padding:0;
font-family:verdana, arial, helvetica, sans-serif;
font-size:8pt;
height: 100%;
width: 100%;
top: 134px;
}
div#wrapper
{
min-height:100%;
width:100%;
position:relative;
height:auto !important; /* for modern browsers */
height:100%; /* for IE */
top:0;
background-image: url(images/bg.gif);
}
#content
{
margin:0;
padding:0;
width:100%;
height:auto;
padding-bottom:40px;
}
#bottom
{
padding:0;
margin:0;
position: absolute;
bottom: 0;
width: 100%;
background: #9ED105;
height: 20px;
border-top:1px solid #000;
}
#top
{
margin:0;
padding:0;
width: 100%;
height: 134px;
border-bottom:1px solid #1862B8;
background-color: #9ED105;
}
#ddblueblockmenu{
height: 100%;
}
#ddblueblockmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
font: normal 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
}
#ddblueblockmenu li a{
display: block;
padding-left: 9px;
width: 169px; /*185px minus all left/right paddings and margins*/
text-decoration: none;
color: white;
background-color: #2175bc;
border-bottom: 1px solid #90bade;
border-left: 7px solid #1958b7;
padding-top: 3px;
padding-right: 0;
padding-bottom: 3px;
}
* html #ddblueblockmenu li a{ /*IE only */
width: 187px; /*IE 5*/
width: 169px; /*185px minus all left/right paddings and margins*/
}
#ddblueblockmenu li a:hover {
background-color: #00509F;
border-left-color: ##00509F;
}
#ddblueblockmenu div.menutitle{
color: white;
border-bottom: 1px solid black;
padding-left: 5px;
background-color: black;
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
padding-top: 1px;
padding-right: 0;
padding-bottom: 1px;
width: 180px;
height: 100%;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="top"> </div>
<div id="content">
<div id="ddblueblockmenu">
<div class="menutitle">Menu 1</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 2</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 3</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
</div>
</div>
<div id="bottom"> </div>
</div>
</body>
</html>
regards
biznuge
January 13th, 2007, 08:41 AM
Almost got it there... This works in FF, but IE, as always is a pain in the behind...
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>menu page</title>
<style type="text/css">
html, body
{
min-height:100%;
margin:0;
padding:0;
font-family:verdana, arial, helvetica, sans-serif;
font-size:8pt;
height: 100%;
width: 100%;
top: 134px;
}
div#wrapper
{
min-height:100%;
width:100%;
position:relative;
height:auto; /* !important for modern browsers */
height:100%; /* for IE */
top:0;
background-image: url(images/bg.gif);
}
#content
{
margin:0;
padding:0;
padding-bottom:auto;
width:100%;
height:auto;
margin-bottom:auto;
/*padding-bottom:40px;*/
}
#bottom
{
padding:0;
margin:0;
position: absolute;
bottom: 0;
width: 100%;
background: #9ED105;
height: 20px;
border-top:1px solid #000;
}
#top{
margin:0;
padding:0;
width: 100%;
height: 134px;
border-bottom:1px solid #1862B8;
background-color: #9ED105;
}
#ddblueblockmenu{
width:185px;
height:100%;
background-color: #1958b7;
}
#ddblueblockmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
font: normal 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
}
#ddblueblockmenu li a{
display: block;
padding-left: 9px;
width: 169px; /*185px minus all left/right paddings and margins*/
text-decoration: none;
color: white;
background-color: #2175bc;
border-bottom: 1px solid #90bade;
border-left: 7px solid #1958b7;
padding-top: 3px;
padding-right: 0;
padding-bottom: 3px;
}
* html #ddblueblockmenu li a{ /*IE only */
width: 187px; /*IE 5*/
width: 169px; /*185px minus all left/right paddings and margins*/
}
#ddblueblockmenu li a:hover {
background-color: #00509F;
border-left-color: ##00509F;
}
#ddblueblockmenu div.menutitle{
color: white;
border-bottom: 1px solid black;
padding-left: 5px;
background-color: black;
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
padding-top: 1px;
padding-right: 0;
padding-bottom: 1px;
width: 180px;
/*height: 100%;*/
}
.cheatDiv{
width:185px;
background-color: #1958b7;
height:inherit;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="top"> </div>
<div id="content">
<div id="ddblueblockmenu">
<div class="menutitle">Menu 1</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 2</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 3</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
</div>
</div>
<div class="cheatDiv"> </div>
<div id="bottom"> </div>
</div>
</body>
</html>
couldn't think of any other way to it besides stick in an extra div below your menu, but I suppose you could apply the same height:auto logic to the content div you already have and then set it's bg color.
biznuge
January 13th, 2007, 08:52 AM
Here Goes. Works in IE and FF. included a new id called "cheatingzlayer" which provides a 100% high left hand bar in the blue color, and added this a first div in the page. main contant div has a z-index set a level above this layer, providing the illusion of a 100% content left hand...
I consider this cheating really, but I couldn't seem to find a way to get that lhm to flow to the bottom of the main content div... :2c:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>menu page</title>
<style type="text/css">
html, body
{
min-height:100%;
margin:0;
padding:0;
font-family:verdana, arial, helvetica, sans-serif;
font-size:8pt;
height: 100%;
width: 100%;
top: 134px;
}
#cheatingzlayer{
z-index:1;
position:absolute;
width:185px;
height:100%;
background-color: #1958b7;
}
div#wrapper
{
z-index:2;
min-height:100%;
width:100%;
position:relative;
height:auto !important; /* for modern browsers */
height:100%; /* for IE */
top:0;
background-image: url(images/bg.gif);
}
#content
{
margin:0;
padding:0;
width:100%;
height:auto;
padding-bottom:40px;
}
#bottom
{
padding:0;
margin:0;
position: absolute;
bottom: 0;
width: 100%;
background: #9ED105;
height: 20px;
border-top:1px solid #000;
}
#top
{
margin:0;
padding:0;
width: 100%;
height: 134px;
border-bottom:1px solid #1862B8;
background-color: #9ED105;
}
#ddblueblockmenu{
height: 100%;
}
#ddblueblockmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
font: normal 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
}
#ddblueblockmenu li a{
display: block;
padding-left: 9px;
width: 169px; /*185px minus all left/right paddings and margins*/
text-decoration: none;
color: white;
background-color: #2175bc;
border-bottom: 1px solid #90bade;
border-left: 7px solid #1958b7;
padding-top: 3px;
padding-right: 0;
padding-bottom: 3px;
}
* html #ddblueblockmenu li a{ /*IE only */
width: 187px; /*IE 5*/
width: 169px; /*185px minus all left/right paddings and margins*/
}
#ddblueblockmenu li a:hover {
background-color: #00509F;
border-left-color: ##00509F;
}
#ddblueblockmenu div.menutitle{
color: white;
border-bottom: 1px solid black;
padding-left: 5px;
background-color: black;
font: bold 90% 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
padding-top: 1px;
padding-right: 0;
padding-bottom: 1px;
width: 180px;
height: 100%;
}
</style>
</head>
<body>
<div id="cheatingzlayer"></div>
<div id="wrapper">
<div id="top"> </div>
<div id="content">
<div id="ddblueblockmenu">
<div class="menutitle">Menu 1</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 2</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
<div class="menutitle">Menu 3</div>
<ul>
<li><a href="#">option 1</a></li>
<li><a href="#">option 2</a></li>
<li><a href="#">option 3</a></li>
</ul>
</div>
</div>
<div id="bottom"> </div>
</div>
</body>
</html>
Hope this helps anyhoo!!! :player:
bigcy
January 13th, 2007, 08:48 PM
thanks a lot biznuge
Its really a huge help from me
regards
biznuge
January 14th, 2007, 12:47 PM
np:nerd:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.