View Full Version : display none

11-04-2009, 02:35 PM
hi all,

I need to insert a dispaly none in div.wrapper and show div.article (and naturally all elements in it) inside the div.wrapper.

<div id="wrapper">
<div id="header"><p></p></div>
<div id="content-top"></div>
<div id="content-wiki">
<table id="doc" style="border-collapse: collapse; border-spacing: 0pt;">
<td id="docTD">
<table id="mainData" align="center">
<td id="mainTD">
<div id="contentdisplay">
<div id="content">
<div id="article"><p></p><table>.....</table></div>

It's seems impossible with dispay none and display block.
How can I do?

Thank you very much

11-04-2009, 05:21 PM
I add more info:
I have to use only CSS (I can't edit html code).
I'd like to show div.article and what it contains but hide (not display) div.wrapper and its descandants (expept div.article).

If you need more info. Tell me.
Thank you very much for solving this awful problem :)

11-04-2009, 05:26 PM
You can’t display elements inside an element that is hidden.

11-04-2009, 05:43 PM
and how can I solve?
I need to hide divs and tables that contains this div.article.
It should be a solution (maybe editing the html code too).

I am making a printable version for my custom template of mediawiki.
It's takes me 1 year for making this skin :(.

11-04-2009, 05:58 PM
First question: Is a table actually feasible (does is make sense) in the context you are using it? Second question: if you need to hide everything except one element and you can’t do this then you need to think about your markup because something obviously isn’t right here.

Now, if you need to hide all content except your article you wouldn’t hide the entire container but each element separately next to the article, e. g. #header, #content-top, etc. Everything that doesn’t affect your article.

11-04-2009, 06:26 PM
Check here and see what I've to do: http://hostinvent.com/wiki/index.php?title=Main_Page.

Is it an easy way to transform table in div?
How can I hide all css background of td(s)?

Thank you very much