• Hi,

    I want to change the background color when I hover over the navigation menu item.
    I changed the style.css file for the navbar hover style, but it didn’t make a change on the menu item.
    Can you please help me to see what the problem is, and the best way to fix it and add the hover effect to the navigation menu?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • .navbar-default .navbar-nav > li > a.active, .navbar-default .navbar-nav > li:hover > a
    custom.css 102 行

    Thread Starter joyce2020

    (@joyce2020)

    Hi @feile Thanks for your reply.

    The 102th row of our custom.css currently reads
    .navbar-default .navbar-nav > li > a.active, .navbar-default .navbar-nav > li:hover > a{border-bottom:2px solid;}

    I changed it to
    .navbar-default .navbar-nav > li > a.active, .navbar-default .navbar-nav > li:hover > a{border-bottom:2px solid;color:#4a6ee4;}

    But there’s no change on the actual site. I tried changing the border width on the existing code as well, but the change isn’t showing up on the front-end site either.

    你不是要改背景颜色吗?
    .navbar-default .navbar-nav> li> a.active,.navbar-default .navbar-nav> li:hover> a { background: #4a6ee4;}

    更改字体颜色
    .navbar-default .navbar-nav> li> a.active>*,.navbar-default .navbar-nav> li:hover> a>* { color: #fff !important}

    建议您尝试学习下 css3 元素选择器

    • This reply was modified 5 years, 4 months ago by feile.
    Thread Starter joyce2020

    (@joyce2020)

    Hi @feile

    Is this what you mean?

    是 背景颜色就是这样改的,

    Thread Starter joyce2020

    (@joyce2020)

    Hi @feile This didn’t make any change to my website though, there’s still no color change when I hover over the menu item…

    我这样改了code可是网页没有改变

    https://www.safeguardlocksmiths.com.au/wp-content/themes/safeguard/css/custom.css
    我查看您的网页 并没有看到代码生效
    你是否保存替换了custom.css文件?

    确认文件已经更新, 如果网页没有变化 请留意清理浏览器缓存
    Google browser ctrl+F5 快速刷新缓存

    Thread Starter joyce2020

    (@joyce2020)

    @feile
    我看没有生效就把那一行删掉了.
    我刚刚又加上了,您可以帮我看看吗?
    谢谢

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘changing hover setting on navigation menu’ is closed to new replies.