hide right side, left side

hide right side, left side

by Martin Koops -
Number of replies: 14

In the topic part of my course the different topics are numbered
=>  class =left side accoring to the firefox information on classes

and can be collapsed by clicking a square
=>  class = right side accoring to the firefox information on classes

I cannot find the entry in the css files to define these classes.

can anyone help??

Average of ratings: -
In reply to Martin Koops

Re: hide right side, left side

by Eneko Arriaga -
Hi Martin,

I am looking to edit the same two classes, in my case to establish a personalised colour for when the topic is marked as the current one.

Please update your post if you find it. I will do so myself.

Thanks very much
In reply to Eneko Arriaga

Re: hide right side, left side

by David Scotson -

If classes or ids don't exist in your theme you can just create them. It is likely that any style you see is being created in the parent theme (ususally Standard). You don't need or want to edit this though, you can just overule it by including a similar rule in one of your own theme's files like so.

.current .side { background-color: red; }

where .current specifies only the selected topic.

In reply to Martin Koops

Re: hide right side, left side

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Martin and Eneko,

The classes you are looking for are:

#course-view .section .side { }

#course-view .section .left { }

#course-view .section .right { }

#course-view .current .side{ }

In #course-view .section .side you define the various parameters applicable to the left as well as the left side of the topics central section.

Then, you may apply different parameters separately to the left and the right sides.

Finally #course-view .current .side is where you apply special parameters to the (one and only one) section which has been highlighted at the current topic in your course (by clicking the light bulb icon in edit mode).

In Moodle's standard theme you will find these classes sprinkled over the 3 CSS files: styles_color.css, styles_fonts.css and styles_layout.css.

Joseph
In reply to Joseph Rézeau

Re: hide right side, left side

by Martin Koops -
Thanks for helping but...I cannot make it work sad

I set the properties #course-view .section .side {
display:none;
}
but this does not hide the squares behind and numbers in fornt of the topics.

other suggestions??,

martijn
In reply to Martin Koops

Re: hide right side, left side

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Using the Moodle 1.5 standard theme, in file styles_layout.css, adding display:none to #course-view .section .side {...} does hide the left side and right side of the sections, as shown on attached screen dump.

Which theme are you customizing? are you customizing this theme directly, i.e. modifying its *.css stylesheets OR (recommended for minor customization) are you creating your own theme based on a theme in the distibution files (i.e. standard, orangewhite, etc.) ???

Just in case, try adding !important to the display:none rule, like this->

#course-view .section .side {display:none!important;}

Joseph

Attachment moodle.jpg
In reply to Joseph Rézeau

Re: hide right side, left side

by Martin Koops -
That is what I try, but still no success ??

I have a them,e based on cornflower (which partly relies on the standard theme).
I have my own css sheets and refer to them in the config.php file. It works fine most of the time.

I changed the css as follows: but still no result...

#course-view .section .side {
display:none!important;
  }

#course-view .section .left {
display:none!important;
}

#course-view .section .right {
 display:none!important;
}

#course-view .current .side {
display:none!important;
}

#course-view .topics {
  margin-top: 9px;
}

#course-view .weeks {
  margin-top: 9px;
}

In reply to Martin Koops

Re: hide right side, left side

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Martin,
At this stage the only thing I could do to help you is to have a look at your theme. If you send it to me as a zipped file maybe I can find a solution.
Joseph
In reply to Joseph Rézeau

Re: hide right side, left side

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Martin,

I did receive your zipped theme. It took me a while to unzip it, because each single file was itself zippedmixed... Then it took me a while again to find out which files were actually used by your theme, since there were a lot of *.css files left over in the theme directory...

Anyway, I found out that the real problem comes from your header.html file, which you have playing around a lot with, and the result is that the output of a course home page in Moodle is not what it should be: there is no #course-view in it, so of course all the settings I gave in my previous posts could not work on a non-existing division...

See attached screen capture.

I agree with Urs that the best way to understand how Moodle CSS works is to use a tool such as Firefox Web developer, and activate the View Style Information mode. That's how I got the CSS info. displayed on my screen capture, and how I discovered your missing #course-view class...

I have not used greasemonkey, and I see from another post of yours that you could not get it to work and then could not get webdeveloper to work. You should probably completely uninstall and re-install Firefox plus its webdeveloper to make it work.

To come back to your problem, you should start with a clean header.html file and proceed gradually to customize it, checking the results in your Moodle site each time you change something.

I hope this will help,

Joseph

Attachment moodle.jpg
In reply to Joseph Rézeau

Re: hide right side, left side

by Martin Koops -

Thank you so much for all the effort.

I'll go on and try it as soon as I can find a minute.

About the firefox problem: uninstalling and reinstalling firefox did not help .
I cannot find out how to uninstall the webdeveloper plugin. I'll go for the Opera option I suppose.

In reply to Joseph Rézeau

Re: hide right side, left side

by Martin Koops -
Firefox is back on track.

Comparing the header.html from the cornflower theme to my own header.html, I cannot find any differences apart form the background color setting instead of the background image cornflower uses.

I cannot find any "course-view" string in the header.html.

Where should I be looking ?? VCan it be that the cornflower theme is different from  the others?

kind regards,
martijn

In reply to Martin Koops

Re: hide right side, left side

by Martin Koops -

Found it!

very silly: a

I found this because of an error message in css-inspector: complaining about double quotes (the php string definition)

So I managed to install the css inspector:D

thanks for alll the help guys!

In reply to Joseph Rézeau

Re: hide right side, left side

by Urs Hunkler -
Picture of Core developers

Martin, if you can not get FF and the extensions to work you have another free opportunity now. Opera offers their very standard compliant browser version 8.5 for free. Andrew Walker works a lot with Opera and Opera works with Greasemonkey scripts. So you can use his CSS "inspector" under Opera.

@Andy: Do you know a similar tool for Opera like the FF "Web Developer Toolbar"?

Urs

In reply to Urs Hunkler

Re: hide right side, left side

by Andrew Walker -
Hi,

Yes there is an Opera developer toolbar - it's not as slick as the one in Firefox, but it does have some quite nice features such as "hover to view computed styles" and "show generated source". I last used it in opera 7.something, so it might have improved by now too wink

You can get it from here - http://nontroppo.org/wiki/WebDevToolbar

Andy