MyBB Community Forums

Full Version: Spoiler with CSS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Regular Expression
\[spoiler\](.*?)\[/spoiler\]

Replacement
<div align="center"><div style="margin: 5px 20px 20px; width: 60%;"><div style="text-align: right; padding: 4px; background: #72B73A; repeat-x scroll 0% 0% transparent; border: 1px solid #2C6302; -moz-border-radius:5px; color:#ffffff; text-shadow:0 -1px #4B7926; font-weight:bold; ">Spoiler: <input type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width: 45px; font-size: 10px; margin: 0px; padding: 0px;" value="Show"></div><div class="quotecontent"><div style="border-right: 1px solid #000000; border-width: 0px 1px 1px; border-style: none solid solid; border-color: #000000; padding: 4px; -moz-border-radius:5px; display: none;">$1</div></div></div></div>

You can edit the CSS to fit your theme.


How to use
[spoiler]Just testing[/spoiler]

Result
[Image: ijFh8I.JPG]
cute Smile
Neat Wink
I didn't understand it by the title, but I did looking at the image Wink nice job
I can't get it to work mate :/
how would we add spoiler="text"]BLAH BLAH[/spoiler]
Not bad but I prefer the normal :p
looks nice but didnt work for me
Added this to my forum!Smile
Thanks for the help!Smile
Itss Amazingg ,,, Big Grin