Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31548
    Wendy
    Guest

    Hi again. Please can you tell me the classes and syntax to change the background colour of the masthead in the Hydra theme? If it needs to be one of the 3 principal colours selected for the theme, I would rather it were the third (dark grey) than the first (white) if that helps at all?

    #31565
    Jesse Owens
    Keymaster

    Hi Wendy-

    It doesn’t have to be one of the palette colors, you can choose. Hydra’s a little tricky because it uses JavaScript to change the background as your visitor scrolls down the page, so you’ll probably want two rules for this.

    For the background before you scroll down, use this rule:

    .palette-primary .site-header { background-color: rgba( 62,62,62,0.8 ) !important; }
    

    The rule above is using the default color palette’s third color of #3e3e3e converted into RGBA so that the transparency of the original design is preserved.

    For the background after you scroll down, use this rule:

    header.smaller { background-color: #3e3e3e !important; }
    
    #31579
    Wendy
    Guest

    Great! That works perfectly! Thanks! Except … I will now need to change all the default text, link and background colours for the menus and masthead text as they no longer show up … Sorry! Should have asked that in the same breath!

    #31600
    Jesse Owens
    Keymaster

    Hi Wendy-

    You’re right, I should have noticed that but I had already modified my header text in my testing site! Use code like this:

    .palette-primary .site-header a,
    .palette-primary .site-header a .fa, .palette-primary .site-header .site-description  {
        color: purple !important;
    }

    Simply change purple to your desired color in Hex or RGB value.
    Edit: Updated this code to work for your site’s tagline, if you’re using it.

    • This reply was modified 4 years ago by Jesse Owens. Reason: fix code
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hydra: Change masthead section background colour’ is closed to new replies.