Reputation: 2277
I'm trying to remove the border with the first child pseudo but I cant get it to work.
this is the class im working with
.main:not(.home-page) > section article h2 {
margin-top: 1em;
padding-top: 1em;
border-top: 1px dotted #ccc;
}
so I tried this
.main:not(.home-page) > section article h2:first-child{
border-top: 0px dotted #ccc;
}
but that didn't do the trick. Any other ideas ?
Upvotes: 0
Views: 265
Reputation: 74046
Just set the respective color to transparent
(MDN on border-top-color
):
.main:not(.home-page) > section article h2:first-child{
border-top-color: transparent;
}
Upvotes: 1
Reputation: 716
Please try this
.main:not(.home-page) > section article:first-child h2{border-top: 0px dotted #ccc;}
Upvotes: 2