- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi Everyone,
I have a problem with RWD, when the “media screen” applied, the css inline style will not be affected. What if i want to change the inline style, i have to use the javascript ? that means javascript callback after the “media screen” ?
Hi cnwtx,
I don’t think this is a good solution.
“!important” will take effect forever, then other “media” for the same css property will not take effect
Instead of using `!important` you should just avoid using any inline styling at all. If you need to add styling via Javascript, then you should add a class and enter the corresponding styles in your CSS file.
sometimes, we need to change the css property dynamically, let’s say using jQuery’ css() function which will update the inline style
The only time you’d need to use an inline style is if you’re calculating some sort of math or doing an animation.
> The only time you’d need to use an inline style is if you’re calculating some sort of math or doing an animation.
yeah, what should I do then ?