Question

FFOX 3 acts different for OVERFLOW:AUTO

Asked by: AmigoJack

Hello there :)

After testing active projects with the new Firefox 3 I experienced that a lot of large IMGs in DIVs are ignoring the style "overflow: auto". I broke this down to the code snippet below, which just works as it should in other browsers (like MSIE 6.0 or OPER 9.5). The images should be larger than the width of the Firefox 3 window, so the overflow should engage.

What bugs me most is: it happens ONLY if the DIV is inside a TABLE. Not surrounded by anything it works as expected. In fact I havent tested for other situations, but right now this is the starting situation to be solved. And of course re-designing the HTML-Layout is not what I'm asking for ;-)

Maybe some Mozilla-only-CSS exists for this? Although I don't want to hack. Or could it be a bug?


Thanx for reading :)
Awaiting all your ideas

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de" dir="ltr"><head>
	<title>.</title>
	<style type="text/css">
		div { overflow: scroll; }
	</style>
</head><body>
	please make sure both pictures have a width greater than the width of your browser window.
 
	<table><tr>
		<td>
		<div><a href="bla.htm"><img src="1.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></div>
		</td>
	</table>
 
	<div><a href="bla.htm"><img src="2.jpg" alt="this displays the scrollbars just like years ago - why not in tables also" /></a></div>
</body></html>

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-07-03 at 04:58:49ID23536499
Tags

firefox

,

css

,

overflow

Topics

Firefox Web Browser

,

Cascading Style Sheets (CSS)

,

Hypertext Markup Language (HTML)

Participating Experts
2
Points
500
Comments
24

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CSS - Div Overflow to the left
    Is there a way to make an image inside of a div overflow to the left? Like, If you have an image that is 200px wide, and it's inside a div that's 100px wide, and this div has it's overflow property equal to hidden, the div will mask the image, only displaying 100 horizaontal ...
  2. CSS Website works in Firefox, but not in MSIE
    Hey, My website used to use tables as it's template file. So today i've been makign it use CSS positioned DIV's. I've got it all working fine and how I want it, but it only works in Firefox. In MSIE the DIV's are everywhere: http://www.raptor-mods.co.uk/index.php Please ...
  3. CSS div overflows over bottom div in firefox
    I've got a div that is overflowing its container and is running over the bottom div. IE6 displays as it should, however firefox is messing up. The url is http://www.forgehammer.com/fh_hair_blue/index.php?m=appointment If you go to the website, the div that is messing up is ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mplungjanPosted on 2008-07-03 at 05:12:39ID: 21924633

Identical behaviour in FF2.0.0.14 after I added the </tr>

Still not woriking in FF3?

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de" dir="ltr"><head>
        <title>.</title>
        <style type="text/css">
                div { overflow: scroll; }
        </style>
</head><body>
        please make sure both pictures have a width greater than the width of your browser window.
 
        <table><tr>
                <td>
                <div><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></div>
                </td>
          </tr>
        </table>
 
        <div><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this displays the scrollbars just like years ago - why not in tables also" /></a></div>
</body></html>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:

Select allOpen in new window

 

by: AmigoJackPosted on 2008-07-03 at 05:31:48ID: 21924757

Oh sorry, just forgot that.
However, with or without </TR> the same behaviour remains in FFOX3 :(

Sidenote: I jumped directly from FFOX1.5 to FFOX3 - did you mean that FFOX2 is displaying it correct (both images are scrollable) or FFOX2 also acts weird and only adds scrollbars to the second image?

 

by: mplungjanPosted on 2008-07-03 at 05:37:55ID: 21924806

No FF 2 works as expected

 

by: mplungjanPosted on 2008-07-03 at 09:31:52ID: 21927048

You are right FF3 on Mac does not scroll horizontally

 

by: scrathcyboyPosted on 2008-07-03 at 11:42:21ID: 21928070

Could this be another of the MANY bugs in FF3?  The fact that the behaviour changes depending on the relation of the DIV to a Table suggest either (1) they only tested FF3 in the arrangement that looks correct, or (2) they have changed their rendering model, and now consider a DIV in a TABLE to be "bad" coding?

 

by: mplungjanPosted on 2008-07-03 at 23:55:07ID: 21931372

And they are of course correct in considering that ;)

 

by: scrathcyboyPosted on 2008-07-04 at 11:34:37ID: 21934343

Just a thought -- try overflow:visible -- see if any difference.

 

by: AmigoJackPosted on 2008-07-07 at 05:48:42ID: 21944500

"overflow:visible;" just does what I expected: showing the whole pictures :-(

I guess it IS a bug. I won't start a discussion which will point out situations where there is no alternative for a DIV inside a TABLE. Aside from that it is clearly allowed by XHTML - if FFOX starts to ignore XSS by dictating its very own definition of good and bad it starts to be even more annoying than MSIE.

Hmm... if nobody really has a solution or explanation for this I would at least share some points for contending my problems :-) Is everybody ok with that?

 

by: mplungjanPosted on 2008-07-07 at 05:58:37ID: 21944547

May I ask what mandates a div inside a table?

I fail to see the need.

 

by: AmigoJackPosted on 2008-07-07 at 09:44:17ID: 21946559

Yes: block elements with a fixed width inside a table cell which has a dynamic width (and height of course) and which needs to be on the same horizontal and vertical position as its neighbours. And this is just a basic scenario on a more complex layout. Only a table fulfills all the needs of a matrix which a conglomeration of block elements can not.

Show me a matrix of block elements not bound to a fixed size or position (not to forget the case of merged cells aka spanning) to prove me wrong ;-)

 

by: scrathcyboyPosted on 2008-07-07 at 11:33:32ID: 21947432

I agree with the need for tables to develop consistent alignment / position / order -- so you won't find me disagreeing with your analysis above.  Which brings to mind, why even use the DIVs at all?  With a good solid table layout, I have NEVER found the needs for using DIVs in such a case.  

If you have an element you need to address that is not a link or form field, then just use SPAN instead of DIV.  DIVs are contrary to table layout anyway -- they span the full width of the page, whereas a SPAN fits nicely into a table layout, without any conflict.

<TD width="200"> <SPAN id="element1">Element 1</SPAN></TD>
<TD width="400"> <SPAN id="element2">Element 2</SPAN></TD>
<TD width="200"> <SPAN id="element3">Element 3</SPAN></TD>

Try adapting your DIVs to SPANs and you will probably solve the issue.  I think Firefox3 authors are thinking this when they decided that DIVs should not go into tables.  That is true in simple cases, but I can think of all kinds of complex layouts where you should be able to nest DIVs in tables -- but they are probably thinking -- NO, you use a SPAN for that, not a DIV.  Maybe they are right .....

 

by: mplungjanPosted on 2008-07-07 at 23:57:16ID: 21951502

Hmm, this works in FF3

<html>
<head>
<style type="text/css">
  div { height:200px; width:200px; overflow: scroll; }
</style>
</head>
<body>
<table>
<tr>
<td><div><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></div></td>
<td><div><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></div></td>
</tr>
</table>
</body></html>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:

Select allOpen in new window

 

by: AmigoJackPosted on 2008-07-08 at 09:28:21ID: 21955443

@mplungjan:
Of course this works, as you specify a width for the DIV. But I can't because of the dynamic width I need.

@scrathcyboy:
I'm pessimistic on that, since a SPAN can be a DIV and vice versa (style attribute "display"), so it wouldn't make any sense. But thanks for taking  this serious ;-)

 

by: scrathcyboyPosted on 2008-07-08 at 17:25:02ID: 21959594

"I'm pessimistic on that, since a SPAN can be a DIV and vice versa"

Not really.  The DIV is generally uncontrolled in width, unless specified.
The SPAN takes ONLY the room it needs for the material in the SPAN.  
The two are very different, you should explore the differences before a "blanket write off".

As you noted at the outset, this is a FF3 ONLY "bug" because they changed the rules.
Face that, and get on with whatever compliant coding you need.  Mozilla Devs are not going to back down from their current "position" with FF3.  You are fighting a losing battle on that.

Good luck.

 

by: mplungjanPosted on 2008-07-09 at 01:02:32ID: 21961388

I could not get a span to scroll...

 

by: AmigoJackPosted on 2008-07-09 at 03:05:39ID: 21961893

Ok, today I tested it again, replacing the DIVs with SPANs - and the behaviour is the one I expected: the SPAN (with style attribute "display: block") behaves the same way a DIV does. Same would be for a DIV with style attribute "display: inline" acting like a SPAN. This does not collide with my very fundamental understanding from the beginning ages ago.

The following code rendered with FFOX3 gives the same undesired (=wrong) result as the code with which this thread started (because a "block"ed SPAN is the same as a DIV; and besides inline elements of course don't scroll). If this really is a new "rule", then it has nothing to do with DIVs in table cells - moreover it is completely about block elements in table cells. All this still does not make sense at all - this behaviour is ridiculous if wanted.

Since yesterday I searched for a bugtrack-like system for FFOX3 but failed to find one :(

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de" dir="ltr"><head>
	<title>.</title>
	<style type="text/css">
		span { display: block; overflow: scroll; }
	</style>
</head><body>
	please make sure both pictures have a width greater than the width of your browser window.
 
	<table><tr>
		<td>
		<span><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></span>
		</td>
	</tr></table>
 
	<span><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this displays the scrollbars just like years ago - why not in tables also" /></a></span>
</body></html>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:

Select allOpen in new window

 

by: mplungjanPosted on 2008-07-09 at 05:19:50ID: 21962708

Here

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de" dir="ltr"><head>
        <title>.</title>
        <style type="text/css">
                div { overflow: scroll; }
        </style>
</head><body>
        please make sure both pictures have a width greater than the width of your browser window.
 
        <table><tr>
                <td>
                <div><a href="bla.htm"><img onLoad="if (window.innerWidth) this.parentNode.parentNode.style.width=window.innerWidth+'px'" src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this wont display scrollbars, instead the scrollbars of the browser itself have to be used" /></a></div>
                </td>
        </tr></table>
 
        <div><a href="bla.htm"><img src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg" alt="this displays the scrollbars just like years ago - why not in tables also" /></a></div>
</body></html>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:

Select allOpen in new window

 

by: AmigoJackPosted on 2008-07-10 at 11:39:33ID: 21976252

Sorry, I wanted a "solution", not a rather dirty js-hack. Aware from that it does not cover the situation of resizing the browser while viewing the page. And after reading a bunch of entries in the Mozilla-Bugtrack I'm very sure it's rather a bug than something wanted.

I'd like to not accept any solution but I want to give at least each of you 100 points for your efforts, while the rest should be refunded since most of the answers (mostly mplungjan's) did not help at all. Call me mean for that, but years ago I experienced real experts here :-/

 

by: mplungjanPosted on 2008-07-11 at 00:46:25ID: 21980607

...most of the answers (mostly mplungjan's) did not help at all...

I did not give any answers, I tried to help you overcome a NEW browser limitation, but now I just feel shitty for even trying (and the resizing can be detected and acted upon)  - feel free to delete the question...

... years ago I experienced real experts here ...

Thanks. I was here years ago too






 

by: AmigoJackPosted on 2008-07-11 at 01:05:28ID: 21980684

Sorry mplungjan, this was my mistake. I simply did not recognize that you are only commenting on all this. So I considered it all to be unhelpful. I also remember your name from back then and was rather happy to see someone known answering (sorry: commenting) my posts. But i misinterpreted it all as half-knowledgeable chit-chat without any true or clear target. Pardon me! And there are many reasons why JavaScript is not an option. First one is, that ironically mostly the FFOX-users disable JavaScript... and one other is that it slows down the site with every substitution for that (imagine around 20 images or more).

(A good example for a JavaScript-overkill is EE itself :D And on top of that the new editbox is either way too slow in FFOX1.5 or it totally screws up the site in OPER9)

 

by: mplungjanPosted on 2008-07-11 at 01:16:59ID: 21980731

It is called Experts-Exchange for a reason...
You found an issue with a brand new browser and I tried a few things to see if we could find out why or how.
I often comment just to give input to the asker and never use the "proposed solution" radio

Some questions have "not possible" as an answer too...

Michel
PS: If you consider a block construct in the table, perhaps you could also try an Iframe? It works best if you put it in a doc with margin=0

<table width="100%"><tr>
<td>
<iframe width="100%" 
src="http://www.antoinettemulder.com/photogallery/juni%202006/een%20echte%20big%20bag.jpg"></iframe></div>
</td>
</tr></table>
                                              
1:
2:
3:
4:
5:
6:

Select allOpen in new window

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...