473,414 Members | 1,692 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,414 software developers and data experts.

Problems with min-height

Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
..container? IE doesn't.
2. Why does Firefox ignore my 'min-height:50%' for the container?
Again, IE doesn't. See
"http://coombes.amandadevries.com/people/Duong.html" to see what I
mean. Because the height is only determined by my text, my image hangs
out of the container.

Both pages pass validation, as does the CSS, with the exception of one
error.

And yes, I use a table for the footer because I can't figure out
another way to have each phrase aligned as you see them...if anyone has
suggestions I'm all ears!

Thanks,
Amanda
www.amandadevries.com

Nov 15 '06 #1
6 3862
am*******@gmail.com wrote:
Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.
Strange. I see a black background, but the DOM inspector shows the
computed background color for that DIV is rgb(102, 51, 51).
Nov 15 '06 #2
On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
am*******@gmail.com wrote:
>Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.

Strange. I see a black background, but the DOM inspector shows the
computed background color for that DIV is rgb(102, 51, 51).
The background colour is rgb(102, 51, 51), but you don't see any of the
background colour because the .container div is completely full of
(black) things. If you give it a bit of padding you see the #633 (102,
51, 51) colour around the edges.
Nov 15 '06 #3
Ben C wrote:
On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
>am*******@gmail.com wrote:
>>Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.
Strange. I see a black background, but the DOM inspector shows the
computed background color for that DIV is rgb(102, 51, 51).

The background colour is rgb(102, 51, 51), but you don't see any of the
background colour because the .container div is completely full of
(black) things. If you give it a bit of padding you see the #633 (102,
51, 51) colour around the edges.
I hadn't dug all the way down. Most of the items under it have a
transparent background, but now I see that the navigation list has a
black background. On the other hand, the paragraph and div that follow
the div containing the navigation list have transparent backgrounds, and
so do all their children.

I see the rest of the problem now. Everything inside the container div
is floated or has only floated children. Therefore, the container div
itself doesn't envelop them and has no height. The table used for the
footer has clear: both; which is why it's entirely below the container div.

I gather that in IE the container div IS enveloping its children.

Isn't the solution to float the container div and give it explicit
width: 100%?
Nov 15 '06 #4
On 2006-11-15, am*******@gmail.com <am*******@gmail.comwrote:
Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.
The background is there (see my other post in this thread).
2. Why does Firefox ignore my 'min-height:50%' for the container?
Again, IE doesn't. See
"http://coombes.amandadevries.com/people/Duong.html" to see what I
mean. Because the height is only determined by my text, my image hangs
out of the container.
It's because the containing block of .container (the body) has an auto
height, which means its height depends on the height of its content.

But the percentage min-height on .container means its height depends on
the height of its container. This is therefore circular, which is why
the spec says in this circumstance, the computed value of min-height
should be 0 (this is in 10.7 of CSS 2.1).

So you can make it work by setting body to height: 100%. That way body
is the full height of the viewport, and .container is half of that.

That may cause other unwanted sideeffects though.

Firefox is a bit inconsistent though because it treats height: 50% on
..container as 50% of the viewport even with 100% set on body. Really it
should treat a percentage height the same way as a percentage min-height
here.
And yes, I use a table for the footer because I can't figure out
another way to have each phrase aligned as you see them...if anyone has
suggestions I'm all ears!
Couldn't you just use a left float and a right float?
Nov 15 '06 #5
On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
Ben C wrote:
>On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
>>am*******@gmail.com wrote:
Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.
Strange. I see a black background, but the DOM inspector shows the
computed background color for that DIV is rgb(102, 51, 51).

The background colour is rgb(102, 51, 51), but you don't see any of the
background colour because the .container div is completely full of
(black) things. If you give it a bit of padding you see the #633 (102,
51, 51) colour around the edges.

I hadn't dug all the way down. Most of the items under it have a
transparent background, but now I see that the navigation list has a
black background. On the other hand, the paragraph and div that follow
the div containing the navigation list have transparent backgrounds, and
so do all their children.

I see the rest of the problem now. Everything inside the container div
is floated or has only floated children. Therefore, the container div
itself doesn't envelop them and has no height.
footer has clear: both; which is why it's entirely below the container div.

I gather that in IE the container div IS enveloping its children.
Sounds like the sort of incorrect thing it would probably do...
Isn't the solution to float the container div and give it explicit
width: 100%?
That should work well, yes. Then the container will be the "block
formatting context box" for the floats, which makes it grow to encompass
them.
Nov 15 '06 #6
Guys,

Thanks for both of your inputs. I will try this last idea and let you
know how it goes. In the meantime, I'm rushing another job, so I might
not get back to this until next week.

Thanks,
Amanda
www.amandadevries.com

Ben C wrote:
On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
Ben C wrote:
On 2006-11-15, Harlan Messinger <hm*******************@comcast.netwrote:
am*******@gmail.com wrote:
Hi there,

I actually have two problems with the following site:
http://coombes.amandadevries.com:

1. Why does Firefox ignore my request for a 'red' background for my
.container? IE doesn't.
Strange. I see a black background, but the DOM inspector shows the
computed background color for that DIV is rgb(102, 51, 51).

The background colour is rgb(102, 51, 51), but you don't see any of the
background colour because the .container div is completely full of
(black) things. If you give it a bit of padding you see the #633 (102,
51, 51) colour around the edges.
I hadn't dug all the way down. Most of the items under it have a
transparent background, but now I see that the navigation list has a
black background. On the other hand, the paragraph and div that follow
the div containing the navigation list have transparent backgrounds, and
so do all their children.

I see the rest of the problem now. Everything inside the container div
is floated or has only floated children. Therefore, the container div
itself doesn't envelop them and has no height.
footer has clear: both; which is why it's entirely below the container div.

I gather that in IE the container div IS enveloping its children.

Sounds like the sort of incorrect thing it would probably do...
Isn't the solution to float the container div and give it explicit
width: 100%?

That should work well, yes. Then the container will be the "block
formatting context box" for the floats, which makes it grow to encompass
them.
Nov 16 '06 #7

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

Similar topics

8
by: CAFxX | last post by:
i'm writing a program that executes some calculations on a bitmap loaded in memory. these calculation ends up with pixel wth values far over 255, but i need them to be between 0 and 255 since i...
3
by: zeedan | last post by:
Hi, I appologise if I'm not posting this to the correct group, but I'm having problems starting MySQL server. I need it in order to post a websurvey for a research project I'm doing for a college...
2
by: Mike | last post by:
Hi all, I am writing a database using SQL as the back end and Access as the front end. My project is to create a rota for when people have to work. The problem I have is setting up the tables...
3
by: Eric Lilja | last post by:
Hello, I'm creating a small utility for an online game. It involves parsing a text file of "tradesskill recipes" and inserting these recipes in a gui tree widget (similar to gui file browsers if...
10
by: Alex | last post by:
Hi, I have a problem with quoting in one of my functions: now TIMESTAMP := ''now''; FOR myRec IN SELECT * FROM myTable WHERE job_end + ''360 Min'' > now LOOP I want to replace the 360 with...
3
by: AZRebelCowgirl73 | last post by:
can anyone help me I cant get this program to run, it errors during bugging! I thought I was pretty close to having it, but I can't get it! thanks! //C++ Project 3: //For your Project 3...
3
by: k2storm | last post by:
I'm having problems with Reports and I'm seeking some help, or advice on how to solve this problem. Any help will be much appriciated! It’s hard to explain but I will try to do my best: In my...
5
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, I'm using a combobox in DropDown style. It shows the time in hours for a proces. In the drop down list I've put in some values like 15 min 30 min 45 min 1 h 2h
19
by: Eugeny Myunster | last post by:
I know, only simple one: #include <stdio.h> int main() { int min=0,max=0,i,arr; for(i=0;i<12;i++) arr=rand()%31-10; for(i=0;i<12;i++)
41
by: Stan Brown | last post by:
As usual, it looks right in Firefox 3 but not in IE6. See http://www.tc3.edu/instruct/sbrown/nicholls/indexgood.htm for the desired behavior -- when you hover over the second or third main menu...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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...

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.