Do @media rules work?

  • Unknown's avatar

    I’m trying to use @media to specify the appearance of my site on mobile devices (with the WordPress mobile theme turned off). I specified the following in the stylesheet:

    @media screen and (max-width: 480px) {
    ...
    }

    but when I saved, it turned into:

    @media screen and max-width 480px {
    ...
    }

    and didn’t work.

    Does wordpress.com allow this sort of customisation of css for mobile devices?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Apparently not.

    The CSS editing here is quite limited, and trial and error is your best way of finding out what works. I’m impressed at anyone who even tries to edit the CSS for a mobile display of a WP.com blog.

    It’s possible that one of the two or three CSS gurus can figure something else out, but we see daily even people editing regular themes that come up against limitations.

  • Unknown's avatar

    WordPress provides their own mobile theme for use here, and from what I’ve seen when testing, it works quite well on virtually all cellphones (Android and iOS at least). It can be activated at appearance > mobile in the dashboard.

    I do not believe that they allow @media at this time, and no clues as to when they will.

  • Unknown's avatar

    I know this is an old thread, but I just found it while searching and wanted to quickly mention that @media rules have been supported in the WordPress.com CSS editor for a while now (in case anyone else searches and finds the same thread). :)

  • The topic ‘Do @media rules work?’ is closed to new replies.