Grow your CSS skills. Land your dream job.

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.

    http://codepen.io/mwbcomputers/pen/FEiht

    Also how do you make links have push down effect.

    # June 23, 2013 at 7:08 am

    Try

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

    http://codepen.io/tandavas/pen/ivFce

    # June 23, 2013 at 7:49 am

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

*May or may not contain any actual "CSS" or "Tricks".