Enlarge the Course title font size

Enlarge the Course title font size

by Denia H. -
Number of replies: 27

Hello, I can i enlarge the Course Title name so it will enlarge all the courses title by default?

Tnx Denia

Average of ratings: -
In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Off the top of my head...

.coursebox > .info > h3.coursename { font-size: 200%;}

adjusting the percentage untill the size is the prefered font size.

 Hope that helps?

Mary

In reply to Mary Evans

Re: Enlarge the Course title font size

by Denia H. -

Hello mary, thank you but we dont have course box > info & in the  title box there isnt an option to edit. look the screens.

Tnx Denia

Attachment course box info.JPG
In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Denia,

Are you familiar with the KLASS theme's settings page, the one where you can change colours etc?

Administration > Site Administration > Appearance > Themes > KLASS (link to settings page)

If you are, please look for the Custom CSS box where you can add that code I gave you as a solution to the font size problem you asked help for.

Hope that Helps?

Mary

In reply to Mary Evans

Re: Enlarge the Course title font size

by Denia H. -

Hello Mary, Thank you & i did set it as you wrote but the course name is still renamed the same, attach a print screen, is it ok?

In reply to Denia H.

Re: Enlarge the Course title font size

by Denia H. -

Hello Mary, Thank you & i did set it as you wrote but the course name is still renamed the same, attach a print screen, is it ok?

Attachment course box info.JPG
In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Denia,

You only added half of the CSS I posted in my answer! You need ALL of it like so,,,

.coursebox > .info > h3.coursename { font-size: 200%;}

In reply to Mary Evans

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

If that still does not work then this may be the problem as the CSS in the Klass theme is slightly different.

So try using this instead...

.coursebox > .info > .coursename a { font-size: 30px;}

In reply to Mary Evans

Re: Enlarge the Course title font size

by Denia H. -

Hi Mary, I tried both but somehow it doesnt change...i will ask our supplier unless you still have patient for me smile

Thank you

Attachment course box info.JPG
In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I have just found what the problem is! The Custom.CSS is added to a stylesheet list in the klass/config.php It is first file.in that list whereas it should be LAST!!!

OK...now we know...so the way to fix this is add !important at the end of the CSS that you added.

.coursebox > .info > .coursename a { font-size: 30px !important; }

Hope that works!!!

Mary

 

In reply to Denia H.

Re: Enlarge the Course title font size

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

That appears to be the More rather than the Klass theme Custom CSS box.

In reply to Gareth J Barnard

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well whatever theme Denia is using it would not have worked for the reason I gave.

I saw the setting looked like More theme, but ignored that as the fix for the .coursename would have worked if the theme she was using at the time was More theme. One cannot discount that, however, the fact it did not working is...

  1. its in the wrong theme
  2. the Klass theme is flawed

So either way its not looking good.

In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Denia,

Where exactly are you adding the CSS? From the look of the image you added earlier, as pointed out by Gareth, it looks like you are adding it to the More custom settings page.  I thought you said the theme you are using was the Klass theme?

Can you please check that you are adding this in the correct place, otherwise we will end up going round is circles?

Thank you,

Mary

In reply to Mary Evans

Re: Enlarge the Course title font size

by Denia H. -

Hello Marry, sorry for the delay. Yes we use Klass theme (moodle 2.8) but our supplier sets for us the settings. 

Yes i defined it in MORE screen since it was the only screen i could find the Custom CSS like you said... .

I dont know why it doesnt work... Our Supplier said he needs to develop it.... i thought i could easily define it alone. Denia

 




css custom

In reply to Denia H.

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ok...well the fact it does not work is because you are using a customised version of the Klass theme. Settings pages are theme specific so if your Klass theme setting page has no Custom CSS section, then the CSS you added to More setting page will only show up if you use the More theme!

The CSS setting in the Klass theme should be in the one marked Header but it your supplier has customised this theme for you then it must be that the CSS option was removed!

Never mind...you can try another way.

Go to

Administration > Site Administration > Appearance > Additional HTML 

and add the same CSS to the head part of the form on that page. There are instructions.

But remember to enclose that CSS in a <style></style> tag.

<style> .coursebox > .info > .coursename a { font-size: 30px;} </style>

Hopefully that will work.

Cheers

Mary

In reply to Mary Evans

Re: Enlarge the Course title font size

by Denia H. -

Ok i'll try. Thank you so far....Denia

In reply to Denia H.

Re: Enlarge the Course title font size

by luciano biondo -
I would enlarge the Course title font size too. Moodle 3.1, theme more.

I wrote at the end of custom css:
.coursebox. > .info > .coursename a {
font-size: 18px;
line-height: 22px;
}

but nothing changed. Font size is always 14 px (eredited by body) Of course I purged all caches.

Please help me!
In reply to luciano biondo

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Use % not px also you need h3 as that is where the font size is difined in moodle.css

.coursebox. > .info > h3.coursename {
font-size: 180%;
line-height: 1;
}

In reply to Mary Evans

Re: Enlarge the Course title font size

by luciano biondo -
I tried but it does not work. May be because I'm using the Mount Orange School settings? I don't believe, I don't see any opposing settings.
Luciano
In reply to luciano biondo

Re: Enlarge the Course title font size

by luciano biondo -
SOLUTION

Whatever you write in custom.css is useless.

You must change the file: themes/bootstrapbase/less/moodle/course.less at line 597.

QUESTION

How can I do to have the changes at the inner of Mytheme that is a working children of More theme?

In reply to luciano biondo

Re: Enlarge the Course title font size

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ciao Luciano,

I am not quite sure what you mean.

If the theme you have is not allowing you to make CSS changes then there must be some things wrong with it.

  1. the custom.css is missing
  2. the custom.css is in the wrong order in the theme's config.php
  3. there is no settings.php, so there are no settings in the child theme.

What is the name of the theme and who made it?

Thanks

Mary

In reply to Mary Evans

Re: Enlarge the Course title font size

by luciano biondo -
Ciao Mary.

"Whatever you write in custom.css is useless" means "whatever you write in custom.css file in order to Enlarge the Course title font size is useless".

It is useless to write !important, to write h3, to write a, to write % instead of pixel, ecc.

The only working solution is to change the file:
themes/bootstrapbase/less/moodle/course.less at line 597.

MY TROUBLE is that the file .less is not in the theme, but in the parent theme, that is not good when you update moodle. I believe I should write something in the config.php of my theme, but I don't know what.

Custom.css, config.php and settings.php are OK.

I wrote the theme I am using: it is more theme - mount orange school with a lot of custom.css and a lot of html inserted in the layout of some pages, with "if" instruction.

Example:
if ($PAGE->url == "http://www.mind.university/course/index.php?categoryid=3")
require_once (dirname(__FILE__).'/lbhomepage/ItalianHomePresentazione.html');


In reply to luciano biondo

Re: Enlarge the Course title font size

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Given your customisations - 'a lot of custom.css and a lot of html inserted in the layout' - have you checked the css selector for YOUR pages using something like firebug? Mary's code works on More, but it may be that your extensive customisations could interfere with that.

Richard