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

Home Posts Topics Members FAQ

Not enough height

I'm embarking on my first pure CSS redesign, so apologies if this is
something obvious. On this page:

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

In Firefox, the text runs down past the end of the main container.
Works fine in IE 6.

On http://www.quirksmode.org/css/100percheight.html, I did read this:
"For instance, if you want to make an element as high as the entire
page (whatever this height may be) you're out of luck." Which seems
crazy. It works fine in IE, so I figure there must be a way to get the
container, with content, to push it down to very bottom on the page in
Firefox as well.

Ideas?

Thanks!

Nov 23 '05 #1
4 1829
es******@gmail.com wrote:

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

In Firefox, the text runs down past the end of the main container.
Works fine in IE 6.


No, IE is broken.

More specifically, IE's default overflow behavior is broken. The subject
has come up often enough, you'll probably find your own answer to this
if you check the groups.google.com archives.

BTW, if you set no height at all, everything should adjust fine all by
itself.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Nov 23 '05 #2
es******@gmail.com wrote:
I'm embarking on my first pure CSS redesign, so apologies if this is
something obvious. On this page:

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

In Firefox, the text runs down past the end of the main container.
Works fine in IE 6.

On http://www.quirksmode.org/css/100percheight.html, I did read this:
"For instance, if you want to make an element as high as the entire
page (whatever this height may be) you're out of luck." Which seems
crazy. It works fine in IE, so I figure there must be a way to get the
container, with content, to push it down to very bottom on the page in
Firefox as well.


If 100% is applied to div, body and html, the div height of 100% is
taken from body, which takes it from html, which is 100% of the
viewport. (IE gets this wrong.)
If at least one of them does not specify a percentage, the div height
will be its content.

--
Gus
Nov 23 '05 #3
In article <3u*************@individual.net>, kchayka <us****@c-net.us>
wrote:
es******@gmail.com wrote:

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

In Firefox, the text runs down past the end of the main container.
Works fine in IE 6.


No, IE is broken.

More specifically, IE's default overflow behavior is broken. The subject
has come up often enough, you'll probably find your own answer to this
if you check the groups.google.com archives.

BTW, if you set no height at all, everything should adjust fine all by
itself.


I found that in Safari. If the heights are all removed it works fine,
and the page gets large enough to cope with the content (or the whole
page gets a scroll bar).

However in the original test page Safari acts as if you have set
main_container overflow: visible; so the text overflows the available
space whereas it sound like IE acts as if it defaults to overflow:
hidden ?

However what is the correct way to get around this if you did happen to
want to include a height? In Safari using overflow: auto or overflow:
scroll makes a scroll bar for the remaining content in main_container if
used in the original test page. I wonder if IE obeys this?

--
http://www.ericlindsay.com
Nov 23 '05 #4
OK, but this solution is not ideal. If I remove the height: 100% from
the html, body and div, it works fine *for pages with content that goes
to the bottom of the page.* Some pages on my site will do this.
Others will not. For those that do not, the main-container will only
go as far as the content. So, what I need is this: a container that
will stretch to 100% of the height of its content, but will also
stretch to 100% of the viewport even if the content does not.

I searched the archives and didn't find a suitable answer to this
problem. Is there a good answer?

Thanks!

Nov 23 '05 #5

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

Similar topics

4
by: Paul | last post by:
Hi, I'm wondering if someone out there can help me overcome this quandary. I need to be able to calculate the height of the current page. I need to calculate the height of the page in pixels after...
10
by: John | last post by:
I have a table with two rows. On the first row is a text box and in the second row is an image. I have set the table cellpadding to 0 and cellspacing to 0. The table is leaving extra spaces in the...
12
by: Stanimir Stamenkov | last post by:
Here are two cases regarding inline-level elements' line-height, padding and background, which I doesn't understand: <div style="background: black; color: white; line-height: 1.5">...
5
by: J Krugman | last post by:
My JavaScript code opens a popup window which contains some text (with hyperlinks), and some buttons. I want this popup to be *as small as possible*, while still showing all of its contents. Is...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e là per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non è possibile impostare la sua...
3
by: laredotornado | last post by:
Hi, Does anyone know a cross-browser way of making an iframe just as big as the HTML content of its source, but no bigger, either width or height wise. Using 100% attributes for iframe width...
1
by: mascouta | last post by:
I have a lot of problems with IE browser, one of them is described in this topic. in my website i have div Calculator with background image. it displayed perfectly with Firefox browser however in IE...
2
by: ChrisNightingale | last post by:
Hi everybody, I have an odd issue which I'm not sure how to resolve. I'm basically implementing a print mechanism which takes a series of controls and reproduces them on a print document. So...
3
by: ishkur88 | last post by:
Hello all, I'm back again with a slight issue with IE (who doesnt have an issue with it :\ ). I am developing a website for a client of mine, and they really like the look of it. Its nearly done,...
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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: 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.