6 months ago, I absolutely stunk at web design. My coding was terrible and dangerous. This part of my character still manifests in my life and work, in my code. That said, what do you do when you have a million web pages containing inline/on-page styles displaying something you now want to urgently get rid of? Well, if all infected pages link to your styles.css file, simply add the same inline style div name to your external style sheet with this code:
- Code: Select all
.divname
{
visibility:hidden;display:none !important;
}
The result? The "!important;" code will override all other CSS code. The inline CSS will therefore be inactive / useless / handicap / doesn't do anything now.
Of course junk code or dirty code still remains. However, mission accomplished, and lesson learned. CSS never ceases to amaze me. I'm learning all the time.
What are some other cool CSS tricks?