Wednesday, 1 February 2017

html - How to hide the first element on the page with particular css class?

One option would be to use the nth-of-type selector:


.button:nth-of-type(1) {
display:none;
}

Note: This selector is supported in IE9+, Chrome, Firefox, Safari and Opera (but not older versions of IE).


Also, it's time to remove the

tags. They have been removed as of HTML5.


Replace it with the equivalent CSS:


a.button {
text-align:center;
}

Here's a working jsFiddle.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...