473,405 Members | 2,294 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,405 software developers and data experts.

Firefox container div not expanding

Hello there, hoping for a little hand with my problem here.....

I have a HTML and CSS page I'm creating and the container div (the outer blue div) does not expand. I have a maincontent div inside this and therefore the container should expand when this div has info in it. Which it does, a copule of news items which make it scroll down the page. But of course the container div doesn't go past a certain stage. I have uploaded the HTML and CSS, very small files. http://www.sendspace.com/file/lr59ob

Could someone please tell me why it is doing this?

ps. In IE and GC it acts weird in different ways. GC the maincontent at the bottom isn't visible and in IE the same where it moves the div out of place slightly too.


It's a very small page and won't take much to look at. I hope you can help.

Thanks

Andrew
Feb 17 '09 #1
7 9228
David Laakso
397 Expert 256MB
Can't speak for anyone else on this forum, but I would not download off sendspace.com if you paid me. Put it on your own host/server and provide a clickable link to it in your post. If you don't have a host /server, provide the entire html and css in your post using code tags.
Feb 18 '09 #2
drhowarddrfine
7,435 Expert 4TB
@AndrewMcLellan
It should not. As always, Firefox is performing correctly while IE is acting at its worst. Never, ever trust IE to do anything correctly. Always, always judge your markup by a modern browser like Firefox/Opera/Safari/Chrome.

Elements/containers are never to expand to contain floated elements. What you are witnessing is one of a million bugs that make up IE. To get the much more advanced browsers to imitate IEs bug, add overflow:hidden to the container div.

In addition, you aren't using a doctype. This puts IE into quirks mode and makes it not attempt to perform like the more advanced browsers. Add this to your first line:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

But the misery may not end there because adding that may change IEs behavior so that it won't look the same. Another reason you should never look at it while coding except after you have things working in the modern browsers.

To add to the injury, you are using XHTML end tags - /> - but have declared HTML. Remove the slashes.

After all that, validate your html and css for those lists of errors that need correcting and let's see where we stand.
Feb 18 '09 #3
Hi Howard, thanks for the reply.

It seems I had 3 d's in hidden so that was why it wouldn't expand.

I want XHTML so I have put:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I have also validated the XHTML and CSS now.

With that now done, the div expands but only to a certain extent; my read more div doesn't show. Do you know how to fix this?

Here's the updated code: http://www.sendspace.com/file/0cbnq7

Thanks again

ps. David, sendspace is a very well known and trustworthy host. But when I get my own host I will do it via that next time. Thanks.
Feb 18 '09 #4
David Laakso
397 Expert 256MB
@AndrewMcLellan
Yes, I know. Some say Internet Explorer is a well known and trustworthy browser, too (among other things, I suffer from paranoia).

Seriously: Good luck for a successful conclusion to your endeavor. You are in good hands...
Feb 18 '09 #5
Dormilich
8,658 Expert Mod 8TB
@AndrewMcLellan
be aware that Internet Explorer doesn't understand 'real' XHTML (i.e. XHTML with the MIME type "application/xhtml+xml")
Feb 18 '09 #6
drhowarddrfine
7,435 Expert 4TB
Also, transitional is never for new pages. Use strict only.

Change overflow:hidden to overflow:auto. My mistake but it won't fix this.

The problem you are having is using floats for everything. This removes those elements from the normal flow. That's why the bottom pulled up before. I don't know why "Read More" has to be in its own div. And don't use spacer divs. Use margin and padding. spacer divs are relics of the 90s.

So it's a matter of rearranging some of this, I think, but I don't have time to look right now.
Feb 18 '09 #7
Hi again, thanks for reply.

I stopped floating so much and fixed some margins here and there and it all seems good now. Thanks for your help.

:D
Feb 18 '09 #8

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

Similar topics

87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
3
by: jimmygoogle | last post by:
I posted earlier with a scope problem. I think I resolved it in IE but in Firefox it still exists. Anyone have any ideas/experience with this? I attached my code sorry it is so long. You can...
1
by: books1999 | last post by:
Hi there, I have a problem with this css/div and i cannot work it out. I would like either container to be able to push the background box to grow but in Firefox it overflows. Can someone find a...
0
by: Patrick.O.Ige | last post by:
I have a Datalist below its inside another datalist In IE it renders fine which means the first td cell with width = 130px is wider than the others So any text in there if its too long goes to the...
1
by: Miked | last post by:
Hello: I'm relatively new to CSS, and I'm doing a site where I don't want to use any tables. I've gotten pretty far, and the site has the layout I want. My only problem is that I'm using the...
1
by: SunshineInTheRain | last post by:
The following code is dynamic create dropdownmenu which data within pulled from database However, the code work well on IE but not on Firefox. On Firefox, the whole mouseover and mouseout function...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
3
by: Steve | last post by:
Hi All I have an asp.net 2.0 website with the following css file It uses Master pages and in Firefox 3.04 for windows only, 3 of the web pages don't display the Master page properly The...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...

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.