...

View Full Version : Having a problem with 100% height?



raplafch
12-09-2009, 04:36 PM
I'm having a problem with this. Everything is working fine and is in the container where it needs to be, but the height of it is too short. Now the sidebar continues past the container, and I'm not sure why? Here is the code:

http://i45.tinypic.com/ubg42.jpg



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><head>
<title>Something About Rachel</title>
<style type="text/css">
ul {
list-style-type:none;
margin:0;
padding:0;
padding-top:6px;
padding-bottom:6px;
}
li {
display:inline;
}
a:link,a:visited {
font-weight:bold;
color:#FFFFFF;
background-color:#63A490;
text-align:center;
padding:6px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active {
background-color:#007868;
}

body {
background:Url("http://i46.tinypic.com/20pugk7.png");
background-repeat: repeat;
height: 100%;
min-height: 100%;
font-size: 14px;
color:black;
text-align: center;
}

#container {
position: absolute;
left: 50%;
top: 0px;
width: 1010px;
height: 100%;
margin-left: -505px;
background-color: white;
}

#header {
position: absolute;
top: 0px;
width: 980px;
padding: 15px 15px 5px 15px;
background-color: white;
}

#nav {
float: left;
position: relative;
top: 220px;
padding: 0px 15px 5px 15px;
background-color: white;
}

#search {
float: right;
position: relative;
top: 220px;
padding: 0px 15px 5px 15px;
background-color: white;
}

#content {
float: left;
position: relative;
top: 235px;
width: 750px;
padding: 5px 15px;
background-color: white;
}

#side {
float: right;
position: relative;
top: 235px;
width: 200px;
padding: 5px 15px;
background-color: white;
}

</style>
</head>
<body>
<div id="container">
<div id="header">
<img src="http://i49.tinypic.com/20s9iqb.png">
</div>

<div id="nav">
<ul>
<li><a href="www.google.com">Home</a></li>
<li><a href="www.mtu.edu">About</a></li>
<li><a href="www.yahoo.com">Portfolio</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
</ul>
</div>

<div id="search">
<form action="http://www.somethingaboutrachel.com/search.html" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-4855415562028963:pcd8z3b01vt" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
</div>
<div id="content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

<div id="side">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

</div>
</body>
</html>

abduraooft
12-09-2009, 04:41 PM
It's not easy to have 100% height with absolute positions all over. I'd recommend you to check http://www.bonrouge.com/2c-hf-fluid(r).php, which is a good 2 column layout.

raplafch
12-09-2009, 06:04 PM
I changed everything to relative position and I'm still having the same problem. Does it have to do with the way I have the .container?

new code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><head>
<title>Something About Rachel</title>
<style type="text/css">
ul {
list-style-type:none;
margin:0;
padding:0;
padding-top:6px;
padding-bottom:6px;
}
li {
display:inline;
}
a:link,a:visited {
font-weight:bold;
color:#FFFFFF;
background-color:#63A490;
text-align:center;
padding:6px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active {
background-color:#007868;
}

body {
background:Url("http://i46.tinypic.com/20pugk7.png");
background-repeat: repeat;
height: 100%;
min-height: 100%;
font-size: 14px;
color:black;
text-align: center;
}

#container {
position: absolute;
left: 50%;
top: 0px;
width: 1010px;
height: 100%;
margin-left: -505px;
background-color: white;
}

#header {
float: top;
position: relative;
width: 980px;
padding: 15px 15px 5px 15px;
background-color: white;
}

#nav {
float: left;
position: relative;
padding: 0px 15px 5px 15px;
background-color: white;
}

#search {
float: right;
position: relative;
padding: 0px 15px 5px 15px;
background-color: white;
}

#content {
float: left;
position: relative;
width: 750px;
padding: 5px 15px;
background-color: white;
}

#side {
float: right;
position: relative;
width: 200px;
padding: 5px 15px;
background-color: white;
}

#footer {
position: relative;
width: 980px;
padding: 0px 15px 15px 15px;
background-color: white;
}

</style>
</head>
<body>
<div id="container">
<div id="header">
<img src="http://i49.tinypic.com/20s9iqb.png">
</div>

<div id="nav">
<ul>
<li><a href="www.google.com">Home</a></li>
<li><a href="www.mtu.edu">About</a></li>
<li><a href="www.yahoo.com">Portfolio</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
</ul>
</div>

<div id="search">
<form action="http://www.somethingaboutrachel.com/search.html" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-4855415562028963:pcd8z3b01vt" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
</div>
<div id="content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

<div id="side">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

</div>
</body>
</html>

frankle
12-10-2009, 05:03 AM
Try replacing your code with this, i am not sure just try




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><head>
<title>Something About Rachel</title>
<style type="text/css">
ul {
list-style-type:none;
margin:0;
padding:0;
padding-top:6px;
padding-bottom:6px;
}
li {
display:inline;
}
a:link,a:visited {
font-weight:bold;
color:#FFFFFF;
background-color:#63A490;
text-align:center;
padding:6px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active {
background-color:#007868;
}

body {
background:Url("http://i46.tinypic.com/20pugk7.png");
background-repeat: repeat;
font-size: 14px;
color:black;
text-align: center;
}

#container {
left: 50%;
top: 0px;
width: 1010px;
height: 100%;
margin:0 auto;
padding:0;
background-color: white;overflow: hidden;zoom: 1; } /* zoom fix for ie6 */


#header {
float: top;
position: relative;
width: 980px;
padding: 15px 15px 5px 15px;
background-color: white;
}

#nav {
float: left;
position: relative;
padding: 0px 15px 5px 15px;
background-color: white;
}

#search {
float: right;
position: relative;
padding: 0px 15px 5px 15px;
background-color: white;
}

#content {
float: left;
position: relative;
width: 750px;
padding: 5px 15px;
background-color: white;padding-bottom: 400px; margin-bottom: -400px;
}

#side {
float: right;

width: 200px;
padding: 5px 15px;
background-color: white;padding-bottom: 800px; margin-bottom:-800px;
}

#footer {
position: relative;
width: 980px;
padding: 0px 15px 15px 15px;
background-color: white;
}

</style>
</head>
<body>
<div id="container">
<div id="header">
<img src="http://i49.tinypic.com/20s9iqb.png">
</div>

<div id="nav">
<ul>
<li><a href="www.google.com">Home</a></li>
<li><a href="www.mtu.edu">About</a></li>
<li><a href="www.yahoo.com">Portfolio</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
</ul>
</div>

<div id="search">
<form action="http://www.somethingaboutrachel.com/search.html" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-4855415562028963:pcd8z3b01vt" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
</div>
<div id="content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

<div id="side">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
</div>

</div>
</body>
</html>







Regards

wuyoo020
12-10-2009, 07:12 AM
try it
<body>
<div id="container">
<div id="header">
<img src="http://i49.tinypic.com/20s9iqb.png">
</div>

<div id="nav">
<ul>
<li><a href="www.google.com">Home</a></li>
<li><a href="www.mtu.edu">About</a></li>
<li><a href="www.yahoo.com">Portfolio</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
<li><a href="www.wordpress.com">Something</a></li>
</ul>
</div>
FF11 RMT (http://www.rmt-link.jp/)
<div id="search">
<form action="http://www.somethingaboutrachel.com/search.html" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-4855415562028963cd8z3b01vt" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>FF11 RMT (http://www.kiraku-rmt.jp/)
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
</div>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum