100% Height [ non CSS hack]

This is a discussion on "100% Height [ non CSS hack]" within the Web Page Design section. This forum, and the thread "100% Height [ non CSS hack] 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 Aug 7th, 2006, 13:30
New Member
Join Date: Aug 2006
Location: Netherlands
Age: 20
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
100% Height [ non CSS hack]

Dear Fellow Webforumz users,

I have a little problem with 1 of my websites.
The layout now looks like this :
  • 1 "Main_Container" that has a height and width of 100%
  • in this main_Container is 1 header div with a height of 120px.
  • Underneath the Header div i want to place a new Container ( "Down_Container" ) this Container must also have a height of 100% ( till the end of the screen )

    In this "Down_Container" will be 3 more divs, and in these divs will be the content/menu/adresse/polls and stuff
the problem is now, that i get a scrollbar, becuz he takes the height of the whole screen and because of the header he "adds" 120px to it.
( so now i have : 120px+screenheight )

Now i know i can solve this with a CSS hack. but i dont want this. what is the proper way to solve this problem ?

Because Code says more then Words:
HTML
Code: Select all
<div id="Main_Container">
  <div id="Header"><div>
  <div id="Down_Container">
  </div>
</div>
CSS
Code: Select all
html, body {
 width:100%;
 height:100%;
 overflow:auto;
 margin:0px;
 font-family:Verdana, Arial, Helvetica, sans-serif;
 font-size:11px;
 background-image:url(images/bk225.gif);
}
 
#Main_Container {
 width:100%;
 height:100%;
 margin:0px;
 padding:0px;
 background-color:#00CCFF;
}
 
#Header {
 width:1012px;
 height:119px;
 background-image: url(images/Respond1_1.jpg);
}
 
#Down_Container {
 width:1012px;
 margin-top:200px;
 height:100%;
 margin:0px;
 padding:0px;
 background-color:#663333;
}
Reply With Quote

  #2 (permalink)  
Old Aug 7th, 2006, 13:32
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: 100% Height [ non CSS hack]

Couldn't you just repeat the background on the body that way regardless of the height of the content div it will have at least the appearance of 100% height. background: url(../images/foo.jpg) top center repeat-y;? Unless you specifically for some reason need the containing div to be 100%. That requires no hacks either btw.
__________________
I've got <style> and .class

Last edited by moojoo; Aug 7th, 2006 at 13:35.
Reply With Quote
  #3 (permalink)  
Old Aug 7th, 2006, 13:47
New Member
Join Date: Aug 2006
Location: Netherlands
Age: 20
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 100% Height [ non CSS hack]

You are talking about Faux Colums ;-)

But in the Down Container are coming 3 more divs. in these 3 divs comes a lot of other divs ( Adress/menu/content/poll enz enz. ) so i need them to be 100% and no bigger then the screensize, so i can position the other divs.

I was thinking about the follow solution.

Just create 1 big div. put here the 3 divs in.
Everydiv that comes into 1 of the 3 divs has a top-margin:120px;
and @ the end make a header div that has absolute post.
( so the header div, will be used as a Overlay div, ( 1 layer ) en also he is out of the workaround.

Dont like this solution, but i think it is the only one.
Reply With Quote
  #4 (permalink)  
Old Aug 7th, 2006, 14:00
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: 100% Height [ non CSS hack]

I was in no way referring to faux columns, but it seems to me you are over complicating a very common and basic layout. Perhaps if I could see what you are trying to accomplish we can avoid any further confusion.
__________________
I've got <style> and .class
Reply With Quote
Reply

Tags
100, height, non, css, hack

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
A Nofollow Hack Corey Bryant Webforumz Cafe 3 Oct 28th, 2007 12:41
How to make a table height equal to the browser height ? subhadip Starting Out 4 Sep 20th, 2007 07:56
HELP!! The underscore hack charlie019 Web Page Design 3 Aug 6th, 2007 19:42
Box Model Hack? jwalker80 Web Page Design 4 Feb 2nd, 2007 02:10
need an IE hack please moisea Web Page Design 2 Oct 19th, 2006 22:32


All times are GMT. The time now is 04:39.


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