473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Div Fluid Height question

I'm having a really hard time figuring out how to do this, if anyone can offer some advice it would really be appreciated.

Basically I'm trying to create a web page with 3 rows:

Top Row: 25 pixel fixed div

Bottom Row: 125 pixel fixed div that's attached to the bottom of the page

Middle Row: I want this to scroll with the height of the web browser with overflow: auto for it's contents. So basically I want it's height to be 100% minus 150 pixels. I don't think there's a way to make the height: 100% - 150px; is there?

Any idea on how I make this all fit together cleanly?

thanks for any help,

Jim
Jan 16 '08 #1
1 3321
drhowarddrfine
7,435 Expert 4TB
I don't think there's a way to make the height: 100% - 150px; is there?
Nope.

I've answered this three times on this board and keep telling myself to make an article about it but I then forget. I'll have to look up my page where I do that but it might take a while.

In any case, what you do is create your header and footer as normal. The div that would be in the middle is then contained in a new "wrapper" div. This wrapper div is set to 'height:100%". Make sure you set "html,body{height:100%}"

This will push the footer down beyond the bottom of the page, so to bring it back into view, give it a negative top margin equal to the height of footer.

Now that's from memory only. I hope details aren't important :)
Jan 16 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Alberto Santini | last post by:
I ported a Jos Stam's demo about Fluid mech to check the difference of speed between C implementation and Python. I think I achieved good results with Python and there is space to improve, without...
5
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which...
2
by: David Winter | last post by:
This is a totally trivial CSS problem, I'm sure, but I don't get it. I want a centered DIV with a fixed width between two other DIVs that should fill the rest of the window/viewport (= 100%). How...
22
by: Jam Pa | last post by:
Once again my big mouth has landed me with a tough job. I have a static CSS layout, where each and every element has been defined by pixel size - lots of them, too! Mostly relative elements,...
2
by: Basso | last post by:
hi all, I'm working on this layout from a lot of days without success. Layout is not too complex: .. 1 navigator on left side (111px width, height: 100%) on right side: { .. on top part my page...
12
by: JB | last post by:
Hi All, Is it acceptable to use a fixed width vertical navigation column within a fluid 2 or 3 column layout? Example. Left Column (navigation) fixed width of say 180px Right Column (main...
6
by: hiazle | last post by:
I have part of my website that has to be laid out with 3 DIVs like this: |---------------------------------------------------------||--------------------| | ...
1
by: lister | last post by:
Hi, I have a div with fluid content, below which I want a scrollable div. I can't work out how to style the scrollable div to say "use the rest of the space in the container". The best I can...
7
by: Nik Coughlin | last post by:
One thing that has always annoyed me, and I just design around it, is having a tile that you want to use for your background image that doesn't seamlessly tile, in a container that you want to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.