The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

Active class not picking up background

  • # June 23, 2013 at 6:31 am

    Hello I have two links which have made the li active “basketactive” will not pick up new background color two red sign in and sign up the two active should be the blue but blue in background.

    Also how do you make links have push down effect.

    # June 23, 2013 at 7:08 am

    This reply has been reported for inappropriate content.


    .basketactive a { <– added 'a'
    background: #010066;

    # June 23, 2013 at 7:23 am

    tried that nothing worked. got it working now using different method.

    # June 23, 2013 at 7:44 am

    Should be avoided but you could always use the important rule on the background –

    background:#YourColor !important;

    As for the push down effect you will need to create a state for it, if you want it to
    look 3D likes its actually going down i suggest going along something like this –

    # June 23, 2013 at 7:49 am

    This reply has been reported for inappropriate content.

    tried that nothing worked.

    I tried it too, before commenting, and it did work for me.

    Maybe you have a different order in your development version because the selector for red background has the same specificity (thus order matters). Try it again in your CodePen.

    # June 23, 2013 at 10:24 am

    I have it working now thanks all will try the 3d button effect see if it suites my web style. trying to use certain reds for color scheme. as found out why takeaway shops use red which is to attract customers trying same effect with my website.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed