Disable display: none in CSS for TD

I have a css file that looks like this:

td { display: none; } .showCell { display: ???? } 

I have a td that I want to draw theoretically on the screen, giving it the class "showCell". However, I do not know what value is for ????? will do this job in all browsers. The value of table-cell works on all but ie6 and 7.

Note: this looks like the question I just asked (http://stackoverflow.com/questions/4696210/opposite-of-displaynone-in-a-td). But I asked him badly there, so please close it if you can.

+4
source share
5 answers

"In Internet Explorer 7 and earlier, the default value for the [display] property for table elements, tr, td, col, and colGroup is a block."

From http://msdn.microsoft.com/en-us/library/ms530751%28v=vs.85%29.aspx

The easiest way to achieve this is through conditional comments. Just put it in a special stylesheet for IE6 and IE7

 <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" href="ie6and7fix.css" /> <![endif]--> 

which would then have

 .showCell { display: block; } 
+3
source
 .showCell { display: table-cell } 
+6
source

For a table cell you need

 display: table-cell 
+2
source

Try the following: .showCell {display: table-cell! IMPORTANT}

+1
source

You can try display: block; . This may ruin the layout of your table, but older IEs do not support the table cell, so you really don't have too many features.

0
source

Source: https://habr.com/ru/post/1335618/


All Articles