• Resolved differentspin

    (@differentspin)


    I would like to change the background color of the main menu items, but only when the menu is collapsed to a dropdown for mobile viewing.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • You perhaps need to master @media queries.

    If you use the following, for example:

    @media (max-width: 979px) {
    	p {
    		color: red;
    	}
    }

    it will change the color of all your text when the screen is narrower than or equal to 979px. Careful you include the correct number of brackets, or it will stop the rest of your CSS working.

    As for the CSS that you need for the menu, take a look at Dave’s navbar guide.

    Getting the CSS right in the menu is a nightmare…

    Thread Starter differentspin

    (@differentspin)

    Thanks for the tip!

    In my case, I added the following to get the desired effect:

    .navbar.resp .nav > li > a {
    background: grey;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Chance css when on mobile’ is closed to new replies.