Reputation: 31
I am developing a website and am trying to remove the "View More" button which if clicked on takes you to a bigger verion of the image. My code is below:
HTML
<figure class="effect-oscar wowload fadeInUp">
<img src="images/portfolio/Mahin.png" alt="img01"/>
<figcaption>
<p>MS Site<br>
<a href="images//portfolio/Mahin.png" class = "mahinport" title="MS" data-gallery>View more</a>
<a href="http://ms.co.uk/" title="MS">View Site</a></p>
</figcaption>
</figure>
CSS
@media (max-width: 357px) {
.mahinport data-gallery{
display: none;
}
}
@media (max-width: 767px) {
.mahinport data-gallery{
display: none;
}
}
I tried to display the data gallery to none but that doesn't work. Thought it would be really simple but turns out I was wrong, will really appreciate some help.
Upvotes: 0
Views: 87
Reputation: 36662
data-gallery
is an attribute.
You would select your element using the attribute selector ([]
) like this:
.mahinport[data-gallery] {
display: none;
}
Or simply:
[data-gallery] {
display: none;
}
Upvotes: 1