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

Differences in rendering elements between Mozilla/Firefox and IE

Well, while working on a rich ui with DHTML I discovered the following
problem:
Mozilla/Firefox seems to be wrong when rendered elements with sizes
given in percents and that are placed into another elements with
percentage sizes, if the content overflows them (of course, overflow is
set to the value of "scroll")

To check the written above please use the given below code

<table style="" height="50%" width="100%">
<tbody>
<tr><td height="25%"><br /></td></tr>
<tr><td height="50%"><div id="eContainer"
style="width:100%;height:100%;overflow:scroll;"><b r />a<br />a<br />a
<br /> a<br />a<br />a<br />a<br />a<br />a<br /> a<br />a<br />a<br
/>a<br />a<br />a<br />a<br />a </div></td></tr>
<tr><td height="25%"><br /></td></tr>
</tbody>
</table>

You see, that DIV element got much more than 0.5*0.5=0.25 = 25% of the
available document height. Moreover, this element doesn't offer you to
scroll its content.
Why? Can somebody give an explanation and a hint how to get the same
behaviour way that IE has (IE renders a layer with 25% height)?
Why does Mozilla/Firefox render elements proper way when the content
doesn't overflow?

Jul 23 '05 #1
1 2108
In article <11**********************@z14g2000cwz.googlegroups .com>,
ca******@yahoo.co.uk enlightened us with...
<table style="" height="50%" width="100%">
<tbody>
<tr><td height="25%"><br /></td></tr>
<tr><td height="50%"><div id="eContainer"
style="width:100%;height:100%;overflow:scroll;"><b r />a<br />a<br />a
<br /> a<br />a<br />a<br />a<br />a<br />a<br /> a<br />a<br />a<br
/>a<br />a<br />a<br />a<br />a </div></td></tr>
<tr><td height="25%"><br /></td></tr>
</tbody>
</table>

You see, that DIV element got much more than 0.5*0.5=0.25 = 25% of the
available document height.


It isn't supposed to get 25% of the DOCUMENT height.
It is relative to its container - which is not the document. It's the table
cell. You're probably looking at this in IE quirks mode, since I don't see a
doctype. Don't expect different browsers to render the same when you don't
give a doctype with a URL.

Also, you might want to validate your html. I'm pretty sure there is no
attribute "height" for table. And the height attribute of TD is deprecated.
http://www.w3.org/TR/html401/struct/....html#h-11.2.1

The above will render differently depending on the doctype. Which you didn't
mention.

BTW, this has nothing to do with javascript, so it's OT here. You'd get
better answers at comp.infosystems.www.authoring.* groups.

--
--
~kaeli~
A little rudeness and disrespect can elevate a meaningless
interaction to a battle of wills and add drama to an
otherwise dull day.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

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

Similar topics

30
by: Matt Probert | last post by:
Is it just me (probably) or is Mozilla and the newer Firefox full of CSS rendering bugs? I ask, because some strange effects occur with Mozilla and Firefox which don't happen in Opera and dare I...
2
by: yawnmoth | last post by:
I'm having some problems with css rendering differently on different browsers, on this page: http://www.frostjedi.com/terra/scripts/graemlin.php on both Opera and Firefox, I get spaces between...
5
by: Mathias Schreiber [wmdb] | last post by:
Hello list, I am quite new to the whole concept of CSS2 driven websites and am now stuck a bit. Take a look: http://www.pudaluda.com/fileadmin/templates/pudaludabarrierefrei.htm This page...
1
by: NightWalker | last post by:
Hello all: I'm having a problem correctly rendering a web page that uses layers to display a web form on top of a flash object. The problem is that the layer renders correctly but the scroll...
7
by: sean | last post by:
SELECT drop-list width incorrect for long text when SELECT is fixed width Setting the width style of a SELECT statement causes the contents of the drop-list to be cropped. This is problematic...
4
by: David R | last post by:
Using this CSS: ------------------------ button { border: none; background: url("Button-LU.gif") center center; padding: 0; text-align: center; margin: 0.5em;
12
by: Brad | last post by:
Does anyone have any other solutions to the Firefox rendering problems with ASP.NET? I've tried the <browsercaps> web.config trick. It didn't work. Am I overlooking something else? Thanks!
7
by: mavigozler | last post by:
IE7 does not appear to set an event on contained text inside SPAN elements whose 'onclick', 'onmouseover', and 'onmouseout' events, defying the HTML recommendation. Firefox appears to conform. ...
4
by: R144N | last post by:
Hi Everyone, I've searched variuos forums as much as I could for a similar problem within the time I could and found no helpful solution, I hope someone here can help me out: I have an iFrame...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.