Fixed Height

This is a discussion on "Fixed Height" within the Web Page Design section. This forum, and the thread "Fixed Height are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 16th, 2006, 16:39
New Member
Join Date: Dec 2006
Location: Maryland
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Fixed Height

I have defined 3 sections in my style sheet; #leftnav, #content, and #rightnav. I'm trying to figure out how to make the sections the same height without have to adjust them for each page. HELP!!!
Reply With Quote

  #2 (permalink)  
Old Dec 16th, 2006, 17:08
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Fixed Height

If you Google for 'faux columns', you will find various examples and explanations.
Reply With Quote
  #3 (permalink)  
Old Dec 28th, 2006, 15:07
Junior Member
Join Date: Dec 2006
Location: ...
Age: 14
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fixed Height

if you have one CSS document then:
Code: Select all
#leftnav{
   float:left;
   height:<height>px;
   overflow:auto;
}
#content{
   float:left;
   height:<height>px;
   overflow:auto;
}
#rightnav{
   float:left;
   height:<height>px;
   overflow:auto;
}
This SHOULD work.
Reply With Quote
  #4 (permalink)  
Old Dec 29th, 2006, 15:21
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fixed Height

There's not a perfect solution. The one suggested by artwich will give you equal column lengths (although you need to add "display: block;" to the id's), but you'll get scroll bars which is IMO a major appearance flaw. I'd rather look at uneven columns.

The faux column solution is simply to give an appearance of equal length by using a vertically tiled (i.e. repeat-y) page-width background image in a #wrap div. This will give a perfect appearance to background and gives you very broad options for fancy styling; however, if there is any break in your page design -- that is, if something goes wrong -- it will look terrible.

I'll suggest a third option, which is the most vigorous but limits your options on styling. Give two of the columns the same background as the wrapping div (and preferably the body as well) and don't put a border at the bottom of them. Normally this is the two outside columns. You'll see this fairly often (in both two and three-column layouts) and it seems to look best when the footer is also the same color and not bordered, or else lightly bordered.

If the center is shorter, it will look shorter than the others, but it gets the appearance of a box, which can actually look really nice. The rest of the style will just flow around it, so the page looks squared up and tidy, even though the center "column" (now a box) is shorter than the others.

One variant of this is to use multiple boxes in the center column. They can be the same background or different, and you can give the column itself the same background as the two other columns, or a different one. Look at this Webforumz page and imagine that there are columns rather than margins on the left and right.
Reply With Quote
Reply

Tags
table styleheight 250px

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make image fixed within DIV swaino Web Page Design 4 Jun 6th, 2008 20:20
Fixed Positioning in IE6 Ryan Fait Web Page Design 3 Mar 18th, 2008 10:32
Fixed Background Issue LeeNic Web Page Design 6 Mar 18th, 2008 09:55
How to make a table height equal to the browser height ? subhadip Starting Out 4 Sep 20th, 2007 07:56
Fixed background?! supanova75 Web Page Design 5 Aug 10th, 2007 23:40


All times are GMT. The time now is 21:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43