• Resolved mikblik

    (@mikblik)


    I have a very simple modification to my homepage. I want the main menu text to be white when the page loads but then turn to default color when I start scrolling. This is my CSS:

    .home .sticky-disabled .navbar .nav>li>a {
    color: #fff;
    }

    It doesn’t work.

    It works without the “.sticky-disabled”, but then my menu color stays white when I start scrolling.

    Any ideas what I am doing wrong?

    My website is https://www.takuhomes.com

    Thanks!
    Mihael

Viewing 2 replies - 1 through 2 (of 2 total)
  • stephencottontail

    (@stephencottontail)

    You’ve got a slight error in your CSS syntax. When you use the selector .home .sticky-disabled, that means “any HTML element with the class ‘sticky-disabled’ that’s contained within any HTML element with the class ‘.home'”. Instead, you’ll want to use .home.sticky-disabled (no space), which means “any HTML element with the classes ‘sticky-disabled’ and ‘home'”.

    Thread Starter mikblik

    (@mikblik)

    Ah, thanks so much, @stephencottontail, I wondered about the absence of spaces between selectors. Now I know!

    Mihael

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“.home .sticky-disabled” doesn’t work?’ is closed to new replies.