Border color in primary menu

Created on 15 April 2024, 8 months ago
Updated 27 June 2024, 6 months ago

I wanted to change the color in primary menu.
In Setting>...>Primary menu>Border color I entered the color, but it is only applied to the top and bottom borders and not to those on the left and right.
I tried with:

#primary-menu {
border-left: 1px solid #B1B894!important;
border-right: 1px solid #B1B894!important;
}

but it does not work.

Thank you and greetings

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy giordy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @giordy
  • Assigned to flashwebcenter
  • Status changed to Fixed 8 months ago
  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    The Solo theme uses CSS variables for most of its styling, making it easy to override them. For example, if you want to change the border color, you can use the Google Inspector to examine the HTML tag. In the screenshot, the color for the primary menu is set in the following CSS rule:

    .page-wrapper .has-border .primary-menu-inner .navigation__primary > li {
        border-right: 1px solid var(--r-br) !important;
    }


    To change this color, you can use an ID selector, which will override a class selector due to its higher specificity. Here is how you can do it:

    #page-wrapper .navigation__primary li {
      --r-br: #B1B894;  /* New border color */
    }

    It is the same for button, link or text.
    In the next screenshot I am changing the text color for the button.

    #page-wrapper input.button { 
      --r-tx-bt: red; 
    }
    #sidebar-box-second input.button {
        --r-tx-bt: green; 
    }

    Following these variables, you can apply it to any region.

      --r-bg: Controls the background color.
      --r-tx: Determines the color of the text.
      --r-h1: Sets the color for h1, h2, and h3 headings.
      --r-lk: Changes the link text color.
      --r-lk-h: Alters the hover color of link text.
      --r-br: Specifies the border color.
      --r-bg-fr: Defines the background color of input forms.
      --r-tx-lk: Adjusts the menu link text color.
      --r-tx-lk-h: Modifies the hover color of menu link text.
      --r-bg-lk: Sets the menu link background color.
      --r-bg-lk-h: Changes the hover background color of menu links.
      --r-tx-bt: Determines the button text color.
      --r-tx-bt-h: Alters the button text color on hover.
      --r-bg-bt: Specifies the button background color.
      --r-bg-bt-h: Sets the button background color on hover.

    CSS Variables: Simplifies theme customization by allowing you to modify styles in one place.
    Specificity: ID selectors are more specific than class selectors, which makes them powerful for overriding styles.
    Important Note: When using !important in your CSS, it is to ensure that these styles have precedence over others that might conflict.

    Best wishes,
    Alaa

  • 🇮🇹Italy giordy

    Perfect, thank you very much.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇺🇸United States flashwebcenter Austin TX
Production build 0.71.5 2024