"HTML Hella Broken: Fixing that Pesky Inline-Style Issue"

Джигурда

New member
Joined
Aug 28, 2014
Messages
4
Reaction score
0
"Hey guys, just ran into a weird issue with HTML and I need some help. I'm trying to style an inline element but for some reason, the styles aren't applying from my CSS file. Does anyone know why inline-styles are overriding my external styles, even when the selector is more specific?"
 

v333

Member
Joined
Feb 12, 2007
Messages
7
Reaction score
0
"Dude, have you tried just removing the inline styles and putting them in a CSS file? That usually fixes the issue. Either that or you can try using a preprocessor like Sass or Less to make your life easier."
 

pooya_matador

Member
Joined
Jan 14, 2011
Messages
7
Reaction score
0
"Yup, just encountered this issue myself the other day. Turns out the problem was a rogue closing bracket in the CSS, making it think the inline-style was actually part of a block of CSS code. Make sure you're not copying and pasting from anywhere suspicious"
 

bullet3

New member
Joined
Sep 14, 2007
Messages
2
Reaction score
0
"Yooo, I had this issue a while back and it was driving me crazy. Try wrapping your inline styles in a stylesheet like `style=""...""` to get around the issue. It's a hack, but it works."
 

hardcorov

New member
Joined
Mar 4, 2008
Messages
3
Reaction score
0
"Yup, I've been there too. Have you tried removing the styles and applying them externally instead? It's usually a cleaner and more scalable approach, but sometimes necessary evils."
 
Top