Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need right column to reach the bottom footer

Status
Not open for further replies.

fauntleroy

Technical User
May 21, 2008
46
US
Hi there, I saw a similar question to the one I'm asking, but my situation is a bit different I think. I need this green sidebar to reach the bottom of the page (all the way to the footer). It needs to be flexible (sometimes shorter, sometimes longer) depending on how much copy goes on the left side ... but it needs to reach the footer. I will have ONE image in the sidebar div tag which will be about three inches high, and will start at the top of the green section. I was hoping I could set a box height in the green sidebar area using percentages ... but that's not working. I can make it taller by assigning pixels to the green box height, but I don't want to do that because this page is being built in a template. It needs to be flexible.

Thanks for any help

Here's the css code...

@charset "UTF-8";
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
.twoColFixRtHdr #container {
width: 780px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
background: #FFFFFF; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left;
margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
clear: both;
}
.twoColFixRtHdr #header {
background: #DDDDDD;
padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.twoColFixRtHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.twoColFixRtHdr #sidebar1 {
float: right; /* since this element is floated, a width must be given */
width: 200px;
padding-top: 15px;
padding-right: 10px;
padding-bottom: 15px;
padding-left: 10px;
background-color: #33FF33;
}
.twoColFixRtHdr #mainContent {
margin: 0 250px 0 0; /* the right margin on this div element creates the column down the right side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
}
.twoColFixRtHdr #footer {
padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#DDDDDD;
}
.twoColFixRtHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
 
Thanks for your responses. I'm not certain faux columns will work in my case as I need one image in the top of the column to be behind the type. BigRed, your suggestion is appreciated, but it looks like the site needs to be liquid, and I need a set width for this site. I'll have to read the tutorial more. Ultimately, I just may need to build the site in tables to get the effect I need. .
 
It's quite enjoyable how lazy sometimes users asking questions are. On the page, right below the navigation menu where you choose the site layout, there are three links to measure widths in percentage, pixels or ems. I feel you would be able to use that for your 'set' width site. And all it would take would be just to pay attention to what experts are spending their time on when they try and help you out.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Is that enjoyable for you Vragabond? Indeed when I posted this, like many others, I'm trying to get the answer quickly. I've read about faux columns aplenty before posting. It's the common answer. I thought I made it clear that I cannot simply multiply an image vertically to fill the vertical column. Setting the width is not the issue ... It's the height of a single column that is vexing for me. Sorry you feel dismissed or abused. I appreciate when folks take the time to answer these questions pro bono. I really do. I too, offer advice on this website in areas where others know less than I, though clearly, CSS is not my arena. Saying "This is something you would use faux columns for..." simply didn't register as "expert" advise to me. It would be like a psychiatrist saying "get a life.." or perhaps, a coach saying "throw the ball downfield.." It seemed too elementary. I was seeking "broader strokes.
 
I suppose I was enjoying myself too much and didn't write too clearly. I was talking about BigRed's response. You mention you believe his solution would work, but it is tailored for fluid layout. However, his site has an option for ems and pixel design as well.

Whether pointing you to a known (for the poster) solution is expert advice or not is hard to say. I cannot know (unless you mention it) that you already know of faux columns and cannot use them. And reading your initial post, readers cannot know that you were looking for broader strokes. Until then, pointing you to a solution that has been proven to work in many very similar cases would be more like a psychiatrist prescribing pills that work for many others.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top