Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS little tricks about RWD

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40015
    Phil_Lu
    Member

    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” ?

    #110791
    Phil_Lu
    Member

    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

    #110795
    TheDoc
    Member

    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.

    #110799
    Phil_Lu
    Member

    sometimes, we need to change the css property dynamically, let’s say using jQuery’ css() function which will update the inline style

    #110870
    TheDoc
    Member

    The only time you’d need to use an inline style is if you’re calculating some sort of math or doing an animation.

    #110872
    Phil_Lu
    Member

    > 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 ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.