Hiding Elements using CSS

Hiding Elements using CSS

by Dave Iles -
Number of replies: 1

Hi,

I'm hoping some of the CSS experts on here can help.  I'm trying to hide a single button that is being displayed by a plugin and uses the standard button classes from the buttons CSS (Adaptable Theme running on Moodle 3.0).

The button class is .btn-secondary and I was hoping that adding the line in bold, shown below, would identify and hide just the "Download as PDF" buttons on the site (generated by the plugin - not pdf articles/resources). I've tried [ ]  and   for the text value but neither work.

Can anyone help?

Many Thanks

/* Secondary button */
.btn-secondary {
    min-height: 32px;
    margin-left: 6px;    
    background-color: setting:buttoncolorscnd;
    color: setting:buttontextcolorscnd;
    text-decoration: none !important;
    display: none [value="Download as PDF"];
}

Average of ratings: -
In reply to Dave Iles

Re: Hiding Elements using CSS

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
Firstly, you would need that "Download as PDF" psuedo selector on the .btn-secondary selector part, not on the display:none rule.
However, you should probably look to see if the plugin that is displaying the button is wrapping all of it's content in another class or id further up the DOM so that you could use something like
.myplugin .btn-secondary {display:none;}
Average of ratings: Useful (2)