Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Full height multi-column div with sticky footer
Old 04-07-2010, 02:02 AM Full height multi-column div with sticky footer
Experienced Talker

Posts: 46
Name: Brent
Trades: 0
I want a multi-column div using a sticky footer. I have the stucky footer figures out, but not the full height mumti-colum. I am racking my brain here. The left column needs to be full height because it will be a colored bar. If you look at the example link below, you can see that when I set it's height (or min-height) to 100% it adds a scrollbar and extends itself past the footer.
I don't know why. Any help would be greatly appreciated!

Working Example:
http://cgsart.com/test/

Code:
html, body {
margin:0;
padding:0;
height:100%;
background: url(images/events_bkgnd.gif) top center;
}
#container {
height:100%;
position:relative;
left:50%;
width:900px;
margin:0 0 0 -450px;
border-left: #705544 2px solid;
border-right: #705544 2px solid;
}
#header {
height: 125px;
border-bottom: #705544 2px solid;
} 
.left {
position:relative;
float:left;
min-height: 100%;
width: 150px;
background: #000000;
}
.right {
position:relative;
float:right;
width:750px;
background: #ffffff;
}
 
#footer {
position:absolute;
bottom:0;
width:100%;
height:20px; /* Height of the footer */
font-size:11px;
color: #000000;
border-bottom: #705544 2px solid;
border-top: #705544 2px solid;
background: #dfd4c3;
}
HTML Code:
<!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">
<head>
<title>Events By Design</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
 
<div id="container">
 
<div id="header"></div><!-- CLOSES HEADER -->
 
<div class="left">Test</div><!-- CLOSES LEFT -->
<div class="right">More Test</div><!-- CLOSES RIGHT -->
 
 
<div id="footer"></div><!-- CLOSES FOOTER -->
 
</div><!-- CLOSES CONTAINER -->
 
 
 
</body>
</html>
 
 

Thank you for looking.
cruizer is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-07-2010, 07:54 AM Re: Full height multi-column div with sticky footer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
because 100% height of root elements is the height of the viewport NOT the hight of "available space"

http://www.candsdesign.co.uk/article...sticky-footer/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-07-2010, 09:14 AM Re: Full height multi-column div with sticky footer
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
Instead of applying backgrounds to the two columns separately, apply a single background image to the container div. You may need to clear beneath the footer div (div#clear { clear: both;}) to force it to expand the whole way down.

Example.
Image Used.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 04-07-2010, 11:40 AM Re: Full height multi-column div with sticky footer
Experienced Talker

Posts: 46
Name: Brent
Trades: 0
Chris, but it expands the viewport when I put it in.

Triple, I was considering that as a last resort.
cruizer is offline
Reply With Quote
View Public Profile
 
Old 04-07-2010, 01:50 PM Re: Full height multi-column div with sticky footer
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
It's the only option I'm aware of that is cross-browser compatible.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 04-07-2010, 02:39 PM Re: Full height multi-column div with sticky footer
Experienced Talker

Posts: 46
Name: Brent
Trades: 0
Well that sucks. You'd really think it would work! if that was my only resort, then it really screws up the other design I am working on. It needs a colored sidebar on the left, and background image in the lower left corner of the right side.
cruizer is offline
Reply With Quote
View Public Profile
 
Old 04-07-2010, 03:16 PM Re: Full height multi-column div with sticky footer
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
If you show me the layout I might be able to tell you how to do that as well...
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 04-07-2010, 03:21 PM Re: Full height multi-column div with sticky footer
Experienced Talker

Posts: 46
Name: Brent
Trades: 0
I'll let you know when I get to it, it's low on the burner right now.
cruizer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Full height multi-column div with sticky footer
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29785 seconds with 12 queries