CSS to hide header on quiz

CSS to hide header on quiz

by Ben Smith -
Number of replies: 1

Using Moodle 2.6+, I would like to remove the header title bar so that my quiz has more real estate and fits on one screen (when using widescreen monitor) without having to scroll to see the "Next" button.  I have entered the following into my theme's Custom CSS field to no effect.  

.quiz-2 #page-header {
display: none;
}

Thoughts?

Ben

Average of ratings: -
In reply to Ben Smith

Re: CSS to hide header on quiz

by Ray Morris -

At least in the themes I've checked, I don't see a quiz2 class, but I do see .path-mod_quiz.  You could try:

.path-mod-quiz #page-header {

   display: none;

}

 

If that doesn't work, load the page in Chrome, then right click in the header and choose "inspect element".  Check that the header (as a whole) is selected 

in the left pane and you'll see exactly which rules are being applied in the right pane.  It may be that a selector more specific than .path-mod-quiz or .quiz2 is being applied.

 

You may also be interested in:

http://docs.moodle.org/dev/Page_API#Base_theme_page_layouts