Saturday 2 February 2019

CSS First Child Not Working

I am trying to have 3 elements space 76 pixels apart (except for the first element) within a div that is centered. However, the first-child pseudo-class doesn't seem to wanna enforce itself. It keeps getting overridden by the original rule.



JSFIDDLE




CSS



.buddy-icons {
margin: 0 auto;
}
.buddy-oval-icon {
padding-left: 76px;
height: 60px;
width: 60px;
}

.buddy-icons > [class^="buddy-oval-icon"]:first-child {
padding-left: none;
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...