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

Home Posts Topics Members FAQ

Firefox Division Extend

Jezternz
145 New Member
Okay basicly, I have a division inside a division.
[HTML]<html><body>
<div id="container">
<div id="header">Main image</div>
</div>
</body>
</html>[/HTML]
and I want the container to grow as the the div's inside it are added. But for some reason it only grows if I add characters into it.(note this happens in FF, works fine in ie)
eg:
[HTML]<html><body>
<div id="container">
<div id="header">Main image</div>
</div>A
</body>
</html>[/HTML]
CSS code:
Expand|Select|Wrap|Line Numbers
  1. html{
  2.     margin: 0 auto;
  3.     width:100%;
  4.     overflow: -moz-scrollbars-vertical;
  5. }
  6. body{
  7.     margin: 0 auto;
  8.     width:100%;
  9. }
  10. #container{
  11.     margin: 0 auto;
  12.     padding:0;
  13.     width: 970px;
  14. }
  15. #header{
  16.      float:left;
  17.      height:100px;
  18.     width: 960px;    
  19.     margin:0 5px;
  20. }
  21.  
It will grow by itself in IE, which is what I want however it wont by itself in FF :(
help please
May 22 '08 #1
2 1482
drhowarddrfine
7,435 Recognized Expert Expert
This is a bug in IE. Firefox is performing correctly. Parent elements are never to expand to contain floated elements. To get Firefox to do what IE is mistakenly doing, add overflow:auto to the parent element.

When the two browsers do things differently, always know IE is almost always the one doing something wrong.
May 22 '08 #2
Jezternz
145 New Member
yeh I have learnt that it is normally IE doing the wrong thing, but just from my observed point of view IE was doin what I wanted it to, even if it was wrong code-wise.
Thanks!
May 22 '08 #3

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

Similar topics

24
by: Teis Draiby | last post by:
In .NET, can I be sure that the result of a division between two integers always is truncated rather that rounded to nearest? Example: 99 / 50 = 1 regards, Teis
1
by: gaehn gaehn | last post by:
Here is my problem in a nutshell: a script to model dynamic table extension. It works under Firefox. But IE just aborts, complaining about an "unknown runtime error" in the line with "innerHTML"....
13
by: rbronson1976 | last post by:
Hi all, I have a very simple page that Firefox has problems with: www.absolutejava.com/testing.htm First of all, this page seems to be perfectly valid XHTML Strict. Both the W3C validator as...
6
by: laramie.hartmann | last post by:
I have a script (see below) that accesses a XML file and displays the contents through a series of document.write calls. This all works fine in IE, but not at all in Firefox. I get no errors in the...
1
by: Horny LaBelle | last post by:
The following style sheet for creating drop caps works fine in Safari, Opera, Omniweb and Explorer, the drop caps extend over 3 lines. Only in Firefox it doesn't look as it should, they extend over...
7
by: Matt Kruse | last post by:
Is it possible to extend the HTMLCollection prototype in Firefox (>=2.0)? It looks like I can do it, but it doesn't work: HTMLCollection.prototype.funk = function() { alert(this.length); }...
2
by: jagadeeshdandu | last post by:
Hi, I am trying to apply the shadow using JQuery for a division, it is working fine, but border of the division is not displaying and if Im trying to hide the division then it is taking a lot of...
10
by: marcstuart | last post by:
How do I divide a list into a set group of sublist's- if the list is not evenly dividable ? consider this example: x = y = 3 # number of lists I want to break x into z = y/x what I...
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...
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
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,...
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
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: 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?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.