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

Home Forums CSS CSS Selector Help

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #45699

    I have a little PHP script that places each section of the URL into classes on the body tag.

    So for example you visit, so the classes apply as:

    Or http://urlcom/admin/posts/new apply as:

    My question is this: I want to apply some blanket styles for all pages that have other classes after admin, but require to not use the admin class by itself. Can this be done?

    So something like:

    body.admin[“.*”] { }

    I don’t know if such a thing exists.

    The reason I ask is this: I want to hide a navigation on any pages that don’t have extra classes after admin, so if I apply it to just the admin class, the navigation will be hidden on all pages.


    `dashboard, posts, etc { … }` is not an option?

    Not sure if this works (or even is a smart thing to do):

    `[class^=”admin “] { … }` (note the space after ‘admin’)

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