473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

final height: 100% question

I've done a lot of poking around the web and this newsgroup and have
seen a number of answers to this question. But, I wanted to appeal to
the experts here one last time before I decide to let the issue go and
move on.

Here's the deal: I have a DIV that I want to stretch to 100% of the
height the page. Not just the viewport, but the page. When there is
content that extends past the viewport, I have to remove all the
height: 100% attributes from my html, body and div CSS definitions, and
it works fine. This is shown here:

http://www.singley.org/pilcrows/test_bg.html

However, if I have a page with not enough content to extend to the
bottom of the page, then, of course, this doesn't work. Like here:

http://www.singley.org/pilcrows/test_bg2.html

To fix this second example, I'd need to add the height attributes back.

So, the question: am I stuck adding height attributes to individual
pages that don't have enough content to extend the DIV to the bottom of
the page? I can live with that, I just want to know for sure if that's
my only solution.

Thanks!

Nov 23 '05 #1
5 1658
es******@gmail.com wrote:
So, the question: am I stuck adding height attributes to individual
pages that don't have enough content to extend the DIV to the bottom of
the page?


html,body{height:100%}
div{min-height:100%}

--
Spartanicus
Nov 23 '05 #2
GENIUS. That was the pearl of wisdom I was looking for. No idea why
it didn't turn up in my searching...Must have been looking for the
wrong things.

Thanks so much!

Nov 23 '05 #3
es******@gmail.com wrote:
GENIUS. That was the pearl of wisdom I was looking for. No idea why
it didn't turn up in my searching...Must have been looking for the
wrong things.

Thanks so much!


Yea right! Two days ago with "height" in subject!

--
Gus
Nov 23 '05 #4
OK, looks like I spoke too soon. The "long" version works fine in
Firefox and IE6:

http://www.singley.org/pilcrows/test_bg.html

But the "short" version isn't working how I want it to in IE:

http://www.singley.org/pilcrows/test_bg2.html

I want the center box to extend to the bottom of the page even when
there isn't content there, and right now that's only happening in
Firefox.

Thanks in advance for another look at this one,

~ Eric

Spartanicus wrote:
es******@gmail.com wrote:
So, the question: am I stuck adding height attributes to individual
pages that don't have enough content to extend the DIV to the bottom of
the page?


html,body{height:100%}
div{min-height:100%}

--
Spartanicus


Nov 23 '05 #5
Please do not top post, and strip sigs given that Google Groups seems to
dumb to do that for you. I've manually restored proper quote order this
once.
Spartanicus wrote:
es******@gmail.com wrote:
>So, the question: am I stuck adding height attributes to individual
>pages that don't have enough content to extend the DIV to the bottom of
>the page?
html,body{height:100%}
div{min-height:100%}


es******@gmail.com wrote:
OK, looks like I spoke too soon. The "long" version works fine in
Firefox and IE6:

http://www.singley.org/pilcrows/test_bg.html

But the "short" version isn't working how I want it to in IE:

http://www.singley.org/pilcrows/test_bg2.html

I want the center box to extend to the bottom of the page even when
there isn't content there, and right now that's only happening in
Firefox.


I thought it was obvious from the usage of min-height that it wouldn't
work in IE without adding one of the available workarounds for that.

Try this if you don't know how to do that:
http://homepage.ntlworld.ie/spartanicus/temp.htm

--
Spartanicus
Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Csaba2000 | last post by:
I apologize for the length of the page below, but I've tried to whittle it down as much as I can. The problem is that Netscape 6.1 on my Win 2K Pro machine is disappearing the final row of the...
7
by: Angelus | last post by:
I want a table to be 100% as high as the viewable area of the page. Well, of course, TABLE HEIGHT is no longer an attribute, so I did a work around using STYLE="height:100%" and <BODY...
5
by: Secret Guy | last post by:
Because of my experience posting various places over the last couple of weeks: I'm expecting to be greated with hostility for asking about concepts instead of "practical" things, since that has...
3
by: Lamberti Fabrizio | last post by:
I've got the problem described in the table above. I've put a div red with some text inside a TD, but its height is less than 100% of TD height as you can see. I've defined the following...
5
by: pagates | last post by:
Hi All, Newbie here again. I have a master page setup that is a two-column table. The left is a table of contents, the right the target. I want the left column to always take up 100% of the...
1
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the...
4
by: fjm | last post by:
Hello everyone, I have a question regarding css where I would like to know if it is possible to break up a page into thirds for the height. I need to have a page that will be 100% in height and...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
2
by: ziycon | last post by:
I have the below code, when a user clicks on the <a href="#" onclick="showhide('languages'); return false;">Language(<div id="current_lang">en</div>)</a> it shows a DIV that is hidden and when...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.