Can someone point out why the hover not working? I managed to add the background images to each the anchor elements. However, the code looks redundant but if I try to move the background-size:cover, background-position: right top and background-origin: content-box to the .menu-item class it just stops working. Also at the bottom of the CSS, there is a #ID:hover that doesn't seem to work and I have no clue why, any tips are appreciated :)
#thumb-services {
width: 100%;
height: 250px;
}
.menu-item {
width: 24%;
height: 100%;
position: relative;
float: left;
margin: 0 0.66666667%;
cursor: pointer;
}
#thumb-services > a:last-child {
margin-right: 0;
float: right;
}
#thumb-services > a:first-child {
margin-left: 0;
}
#tratamento-imagem {
background: url('http://lorempixel.com/100/200/sports/1/') no-repeat;
background-size:cover;
background-position: right top;
background-origin: content-box;
}
#portfolio {
background: url('http://lorempixel.com/100/200/sports/2/') no-repeat;
background-size:cover;
background-position: right top;
background-origin: content-box;
}
#fotografia {
background: url('http://lorempixel.com/100/200/sports/3/') no-repeat;
background-size:cover;
background-position: right top;
background-origin: content-box;
}
#montagem {
background: url('http://lorempixel.com/100/200/sports/4/') no-repeat;
background-size:cover;
background-position: right top;
background-origin: content-box;
}
#tratamento-imagem:hover {
background: red;
}
<nav id="thumb-services">
<a id="tratamento-imagem" class="menu-item"></a>
<a id="portfolio" class="menu-item"></a>
<a id="fotografia" class="menu-item"></a>
<a id="montagem" class="menu-item"></a>
</nav>