Closed Bug 303047 Opened 19 years ago Closed 19 years ago

CSS display='none' viewing errors.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: the_invincible, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

i define a function with JS, something like,

"document.getElementById('FT20').style.display='none';"

i define a <td id="FT20"> wich could be visible or invisible, the same bug is is
smashing the website if i using the <tr id="FT20"> 



Reproducible: Always

Steps to Reproduce:
1.choose IMDG/IMCO Good  Optionfield => YES(ja) OR "Übergröße" => YES(ja)
2.You will see a the <td> or <tr> will be visible by wrong the way!! 
3.Compare the results with the Internet Explorer! 


Actual Results:  
1.choose IMDG/IMCO Good  Optionfield => YES 
2.You will see a the <td> or <tr> will be visible by wrong the way!! 
3.Compare the results with the Internet Explorer! 



Expected Results:  
the correct sollution is could be viewed by the IE... 

this bug smashed the website...

no crash
Could you please attach a minimized testcase?
https://bugzilla.mozilla.org/attachment.cgi?bugid=303047&action=enter
Summary: CSS disply='none' viewing errors. → CSS display='none' viewing errors.
Because you set the "display" property to "block" in einblenden(),
Firefox displays the corresponding element as a block object.
To understand the "display" property, read the CSS 2.1 spec:
http://www.w3.org/TR/CSS21/visuren.html#display-prop

This is not a bug, should be resolved as INVALID.

Changing:
  function einblenden(elementname)
  {
   document.getElementById(elementname).style.display='block'; 
  }
to:
  function einblenden(elementname)
  {
   document.getElementById(elementname).style.display=''; 
  }
will solve the problem.
i've changed the the JS, and now it works fine, thanks 4 fast respsonding... 

it was my mistake, but i can't understand the sense of the display='block'
CSS-Strukture... 

sorry 4 disturbing the project, to work on... 

firefox is the best browser in the whole wide world :-) 
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Nothing was fixed in Firefox, reopening
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → INVALID
It doesn't load properly, but when I refresh it goes to the desired action,
seems to me not a flaw in firefox but in the js?
now i've changed the Source in the Webserver... 

hmpf, there is really an bug, if i press F5 (refresh)... 

and if i choose "Oversize" => no the table Color is like the background and not
like the <td> cell, the dark gray... 

MfG thE_iNviNciblE
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(In reply to comment #6)
> and if i choose "Oversize" => no the table Color is like
> the background and not like the <td> cell, the dark gray...

Table cells are rendered by TD/TH elements but not TR elements.
That is, bgcolor attribute of the TR element will not used if
there is no TD/TH element. And rendering of TD/TH element with
display "none" is the same as there is no TD/TH element.

<tr bgcolor="#CCCCCC">
  <td bgcolor="#CCCCCC">&nbsp;</td>
  <td id ="oversizeB">(snip)</td>
  <td colspan="2" id="oversizeL">(snip)</td>
  <td colspan="3" bgcolor="#CCCCCC" id="oversizeH">(snip)</td>
</tr>

If you hide oversizeB, oversizeL, and oversizeH, these cells
will not be rendered so bgcolor of TR (#CCCCCC) will not be used.
As a result, you will see body's background-color #e0e0e0.

I think that this behavior is by design.
I believe the original issue here is resolved as an error in the webpage and so
this bug is INVALID. Any other issues are separate to this bug.

Reporter, if you are having other issues with your site please try using support
forums first before submitting bugs, and if you have to submit a bug please
attach a simplified testcase wherever possible.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.