HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Type in your code below
Run
<!DOCTYPE html> <html> <head> <title>CSS Toggle An Element Display</title> <style> label { color: #fff; background: #3e5afb; border-radius: 5px; padding: 30px; cursor: pointer; } .showANDhide { margin: 100px; font-size: 3vw; } input { opacity: 0; } .showANDhide { display: none; } input:checked+.showANDhide { display: block !important; } </style> </head> <body> <label for="ErisanAkorede">Click Me To Toggle</label> <input id="ErisanAkorede" type="checkbox"/> <div class="showANDhide"> Wow another awesome Example made width css </div> </body> </html>
Related Chapters
CSS Floats
CSS Display
Related Examples
CSS Visibility Hidden Example
CSS Display Block Example
CSS Interactive Content on Hover