DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: How-To: Override Inline Styles from the Stylesheet  (Read 7,439 times)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,888
    • Participated in NANY Challenge Six Times
    • Coding Snacks
    • Gathering Badge
    • Cody Award
    • Volunteers/Staff
How-To: Override Inline Styles from the Stylesheet
« on: January 14, 2009, 01:43 PM »
If you have ever used a 3rd party offsite script in which something like a widget was inserted into your pages, and had no control over the inline styles it included and thought there was no way to fix it so it looked right on your pages, changing margins & padding, changing fonts or colors, backgrounds, etc., then read this. The answer is here.

You CAN force it to use YOUR styles and not the inline ones inserted by the script. And it's all done with your CSS.


Quote
You read that right. I said override inline styles, and no, I have not been drinking. For the longest time it has bugged me that there was no way to override what someone else had done with inline styles. I understand they’re supposed to be the override, and I get why, to a certain extent, but I also think there should be an override to certain overrides when those overrides are abused. Make sense?

SNAG-00043.png
http://nataliejost.com/override-inline-styles-from-the-stylesheet/

raybeere

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 94
Re: How-To: Override Inline Styles from the Stylesheet
« Reply #1 on: January 16, 2009, 11:24 PM »
Hey, thanks! That looks pretty useful. Something I've wanted to figure out how to do for a long time, at least.  :)

Original address: https://www.donationcoder.com/forum/index.php?topic=16583.0