Basically, I have a table. Onload, I set each row of the table to display:none
since I have a lot of javascript processing to be done and I don't want user to see it while it is being done. I've set a timer to display it after a little while, my problem is that i can't get the table row to display like a table row. If I set display:block
, it would just not line up with the headers (th). The only solution I've found is display: table-row
from css2, but ie 7 and below does not support this declaration.
Any solution?
Simply changing display = "block" to display = "" fixed it. Save this answer.
getElementById("element"). style. display = "none"; To show an element, set the style display property to “block”.
display: block An element that has the display property set to block starts on a new line and takes up the available screen width. You can specify the width and height properties for such elements. Examples of elements that are at block-level by default are <div> , <section> , <p> , and lots more.
You can hide an element in CSS using the CSS properties display: none or visibility: hidden . display: none removes the entire element from the page and mat affect the layout of the page. visibility: hidden hides the element while keeping the space the same.
set display to an empty string - this will allow the row to use its default display value and so works in all browsers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With