User:Davidgothberg/Test15

For the CSS code that makes this work see the bottom of this page. When/if you copy that CSS code into your monobook.css you will see different parts of the text below disappear or turn green depending on in which section the text is.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen. 

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

{| class="wikitable"  
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * Section0green and, sectiongreen.
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 *  Section0green and, sectiongreen.
 * colspan=2 |
 * colspan=2 |


 * }

First header
Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen. 

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

{| class="wikitable"  
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * Section0green and, sectiongreen.
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 *  Section0green and, sectiongreen.
 * colspan=2 |
 * colspan=2 |


 * }

And a h3 tag
Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen. 

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ". Section0green and, sectiongreen.

{| class="wikitable" </i> </i>
 * Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * Section0green and, sectiongreen.
 * <i>Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * <i>Section0hide " visible ", sectionhide " visible ", and senctionhideall " visible ".
 * <i> Section0green and, sectiongreen.
 * colspan=2 |
 * colspan=2 |


 * }

CSS code
When/if you copy this CSS code to your monobook.css you will see different parts of the text above disappear or turn green depending on in which section the text is.

/* David's section based actions styles v0.1 */

/***** Turn different text green depending on section. *****/

/* Turn .section0green on in section 0. */ h3 ~ * .section0green, h3 ~ * * .section0green, h3 ~ * * * .section0green, h3 ~ * * * * .section0green, h3 ~ * * * * * .section0green, h3 ~ * * * * * * .section0green, h3 ~ * * * * * * * .section0green, h3 ~ * * * * * * * * .section0green {  background:green; } /* And then turn .section0green off again in the other sections */ h2 ~ * .section0green, h2 ~ * * .section0green, h2 ~ * * * .section0green, h2 ~ * * * * .section0green, h2 ~ * * * * * .section0green, h2 ~ * * * * * * .section0green, h2 ~ * * * * * * * .section0green, h2 ~ * * * * * * * * .section0green { background:transparent; } /* Turn .sectiongreen on in the rest of the sections */ h2 ~ * .sectiongreen, h2 ~ * * .sectiongreen, h2 ~ * * * .sectiongreen, h2 ~ * * * * .sectiongreen, h2 ~ * * * * * .sectiongreen, h2 ~ * * * * * * .sectiongreen, h2 ~ * * * * * * * .sectiongreen, h2 ~ * * * * * * * * .sectiongreen { background:green; }

/***** Hide different text depending on section. *****/ /* Hide text in section 0. */ h3 ~ * .section0hide,           /* For normal text */ h3 ~ * * .section0hide,         /* For divs */ h3 ~ * * * .section0hide,       /* For divs in divs */ h3 ~ * * * * .section0hide,     /* For tables */ h3 ~ * * * * * .section0hide,   /* For tables in divs */ h3 ~ * * * * * * .section0hide, /* For ? */ h3 ~ * * * * * * * .section0hide, /* For ? */ h3 ~ * * * * * * * * .section0hide /* For tables in tables */ { display:none; } /* And then show text again in the other sections */ h2 ~ * .section0hide, h2 ~ * * .section0hide, h2 ~ * * * .section0hide, h2 ~ * * * * .section0hide, h2 ~ * * * * * .section0hide, h2 ~ * * * * * * .section0hide, h2 ~ * * * * * * * .section0hide, h2 ~ * * * * * * * * .section0hide {  display:inline; } /* Hide text in other sections. */ h2 ~ * .sectionhide, h2 ~ * * .sectionhide, h2 ~ * * * .sectionhide, h2 ~ * * * * .sectionhide, h2 ~ * * * * * .sectionhide, h2 ~ * * * * * * .sectionhide, h2 ~ * * * * * * * .sectionhide, h2 ~ * * * * * * * * .sectionhide { display:none; } /* Hide text everywhere. But only if the browser is compatible. */ h3 ~ * .sectionhideall, h3 ~ * * .sectionhideall, h3 ~ * * * .sectionhideall, h3 ~ * * * * .sectionhideall, h3 ~ * * * * * .sectionhideall, h3 ~ * * * * * * .sectionhideall, h3 ~ * * * * * * * .sectionhideall, h3 ~ * * * * * * * * .sectionhideall { display:none; }

Idea by David. Solution suggested by Ais523 was:  Then reworked and extended by David.