Show border with CSS Hover

Asked

Viewed 1,329 times

0

I am developing a web application and would like when I hover over the menu item to show a border above and below the item with the white color, but it is not working.

Example.

inserir a descrição da imagem aqui

My application

Link to go to application with the problem

  • The link is not working.

1 answer

1


.nav navbar-nav .conteudo:hover{
    border-top: 3px solid white;
    border-bottom: 3px solid white;    
}

Nav and navbar-Nav are classes of the same tag, so the CSS does not work, you must use a single class of each tag to reference. Remove the navbar-Nav and the code will work.

Correct form:

 .nav .conteudo:hover{
    border-top: 3px solid white;
    border-bottom: 3px solid white;    
}
  • Nav . navbar-Nav . content:Hover{ border-top: 3px Solid white; border-bottom: 3px Solid white; } Wrong CSS selector

Browser other questions tagged

You are not signed in. Login or sign up in order to post.