semi-dynamic css class name (3 posts)

  1. Soundofsirens
    Posted 7 years ago #

    Hi there! :)
    I've got a css question:

    How do i format a semi-dynamic class name, which looks like this: "page_item page-item-7 current_page_item "

    The strong part is te dynamic one.

    I'm looking for something like:

    .*current_page_item* { }

    Do you know, what i mean?

  2. Michael Fields
    Posted 7 years ago #

    Could you please elaborate on why you need this? How do expect your page to function? I am pretty certain that you cannot express variables in CSS2. CSS3 will contain a selector that will satisfy your request, but who knows how long that will take to get support across the board?

    an E element whose "foo" attribute value begins exactly with the string "bar"

    from: http://www.w3.org/TR/css3-selectors/#selectors

    If you let me know more about what you're trying to accomplish, I can most likely help you to find a working solution.


  3. DianeV
    Posted 7 years ago #

    So, you're trying to use a variable to insert a CSS class on the page? Or in the stylesheet?

Topic Closed

This topic has been closed to new replies.

About this Topic