I have multiple div
s inside a div
with a class of .grid
. Inside those div
s i have a link in each. I styled those links by using the selector .grid div a
. After that i added another link in each div
, and gave it a class .name
and selected it using .grid div .name
. The problem is that these new links with class name are affected by the cascade. Why is that happening? .grid div .name
selector is more specific right?
This is my CSS
This is for making a div into a clickable link
.grid div a
{
position:absolute;
width: 100%;
height: 100%;
top:0;
left:0;
text-decoration: none;
z-index: 1;
}
This is the style for the other links
.grid div.name
{
position: absolute;
height: 20px;
width: 120px;
font-family: lato;
color: #424242;
}