Themes

Changing color of all submit buttons in Essential

 
 
Picture of Willow Nolland
Changing color of all submit buttons in Essential
 

Hi,

I'm working in Moodle 2.6 and using the Essential theme.  I'm trying to change the color of all of the submit buttons (those in lessons, quizzes, etc) in the course I'm developing so that they are black with white writing.  This is the CSS I am using, but they keep appearing as white buttons with black writing.

input[type="submitbuttin"] {background-color:#000000;
border: none;
color: white;
font-weight: normal;
text-transform: normal;}

I have trying playing around with this CSS in a variety of different ways, and the buttons keep appearing the same.  What am I doing wrong?


 
Average of ratings: -
It's only an avatar...
Re: Changing color of all submit buttons in Essential
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Well I think that spelling might have something to do with why it is not working. First of all I think 'submitbuttin' is non-existent, but 'submit' on its own should work...

input[type="submit"] {
    background-color: #000000;
    border: none;
    color: white;
    font-weight: normal;
    text-transform: normal;
}

 
Average of ratings: -
Picture of Willow Nolland
Re: Changing color of all submit buttons in Essential
 

That was actually just a typo here.  I used "submitbutton" in the actual code, but it didn't work.  So, I changed it to just "submit", but the button is still showing up as a white button with black text.  I'm entering the CSS into the custom CSS box in the general settings area of site administration.  That's where I'm supposed to put it, right?

 
Average of ratings: -
It's only an avatar...
Re: Changing color of all submit buttons in Essential
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Willow,
I have just been looking at the Essential theme and found that there are settings to allow you to choose an alternative colour for the theme which also changed the buttons too. Have you tried that setting yet? 

Cheers

Mary

 
Average of ratings: -
Me
Re: Changing color of all submit buttons in Essential
 
Well, that's a tricky one. You see, most buttons are type="submit", but they're not all 'submit' buttons if you know what I mean (they can be 'next', 'cancel', etc.) So you definitely don't want to apply your style to type="submit" if you're wanting only 'submit' buttons to be different.

On a quiz page the submit button has a value="Submit all and finish" but on a lesson page you have value="Submit" or name="submitbutton".

If you just want to change the 'submit' button colour then you need:

input[value="Submit"] {}

If you want to also change the button on the quiz page, you'll need:
input[value="Submit"], input[value="Submit all and finish"] {}

Or simply:
input[value~="Submit"] {}

...which means that the value contains the word Submit.
 
Average of ratings: -