CSS | Moodle Standard Theme Change | Help

CSS | Moodle Standard Theme Change | Help

by Marco Duarte -
Number of replies: 7

Hello, I'm having a problem making a change in Moodle Standard Theme.

I've made a picture to help me explain the problem:

Moodle Problem

 

The goal is to increase Course Long Name Box width and decrease it in Course Description Box, or remove it from there.

 

I've been seaching in theme/standard/style files but I can't find the lines of code I need for the change.

 Moodle 2.1

Any ideas?

Thanks, Marco Duarte (Portugal)

Average of ratings: -
In reply to Marco Duarte

Re: CSS | Moodle Standard Theme Change | Help

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Marco,

Sorry I can't answer your question, however I'm going to move your post to the themes forum where all the experts hang out...

In reply to Marco Duarte

Re: CSS | Moodle Standard Theme Change | Help

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

Hi Marco,

If you use Firefox browser download the add-on called Firebug this will help you detect the CSS selector needed to make theme changes.

There are 2 elements you need to change or add to the core.css in Standard theme if this is what you have planned to do.  It is not always a good thing to change any CORE themes as these get updated when you upgrade and so you will loose your settings.

However, to make the changes what I did in my theme, is to make the Category box and the Description box width:100% and float: left

This will give you a wide box where both are the full width of the page.

HTH

Mary

In reply to Mary Evans

Re: CSS | Moodle Standard Theme Change | Help

by Marco Duarte -

Hello Mary,

 

Thanks for the Firebug add-on info, it will help me alot in my works, but doesn't help me much with this issue.

Well I think you are talking about the file core.css, and my main problem is to find the exact line that allows me to add or edit that code.

 

Anyway thanks for helping, Marco

In reply to Marco Duarte

Re: CSS | Moodle Standard Theme Change | Help

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

Mary is right that firebug will give you the css selector and the existing rule that creates the lengths in place. It will also show you where that rule comes from - the part of Mary's instruction you need then is where she has said these are the parts you need to change or add.

If the selectors and rules are shown by firebug to be in one of the existing theme style files then you can change them. If they come from a parent theme, or moodle core however, then you can add those rules to one of the theme style files (such as standard/styles/core.css) and they will then override the parent rules.

Richard

In reply to Marco Duarte

Re: CSS | Moodle Standard Theme Change | Help

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

What I am trying to say and badly at that Marco is the the code might not necessarily be in the Standard theme. It is more likely to be in the base theme core.css. But it makes no difference, becasue you cann add it to core.css in Standard theme then it will work for you. What you need to do is add the selector like this

.category-box { width: 100%; float: left; clear: left;}

.description-box { width: 100%; float: left; clear: left;}

but these name are not right and I dont have time to find the correct ones. But then the only way to learn is to do it for yourself...hence the Firebug reference.

Mary

In reply to Mary Evans

Re: CSS | Moodle Standard Theme Change | Help

by Marco Duarte -

Thanks for the support Richard and Mary.

I'm sorry but I can't figure out where in Firebug I can get something that leads me to the correct name of the objects I want to change.

I'll keep trying if I get to something I'll post it here.

 

Marco!

In reply to Marco Duarte

Re: CSS | Moodle Standard Theme Change | Help

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

OK I feel sorry for you now! LOL

Here's how you do it...see attached marco.css (top right of this comment)

To stop the summary from showing up you just need to add display: none and it will vanish!

HTH

Mary

 

Edit: Upload's not working!!!