Removing the border around the course image

Removing the border around the course image

by Reza Dan -
Number of replies: 4

Hello,

Is there a way to remove the border around the course image on the front page in Moodle 3.0.

Reza

Average of ratings: -
In reply to Reza Dan

Re: Removing the border around the course image

by Just H -

Few more details required as the image posted doesn't really show what the issue is e.g. what does the image look like on the front page, what theme are you using, what is the page background colour, does the image have a white background or a transparent background?

In reply to Just H

Re: Removing the border around the course image

by Reza Dan -

Hello,

I have attached the original image and a screenshot of what the image looks like on the front page.  The image itself has a transparent background. It is not clear where the border has come from. The theme is Academi.  I even tried to remove the transparent background and made it white to no avail.

Reza

In reply to Reza Dan

Re: Removing the border around the course image

by Matthias Giger -
Picture of Particularly helpful Moodlers

Depending on the theme you are using with your Moodle instance you can overwrite the default format with a bit of CSS code.


Go to site administration > appearance > themes and choose your theme.

If you see a field there called "custom css" you can change any element as long as you know it's name.

Enter something like ...

img.XXX {

border: none;

}

whereas XXX is the classifier of the type of image you want to change.

In case it doesn't work you might have to override a general setting by using !important:

img.XXX {

border: none !important;

}


The classifier might depend on the theme you are using. The best way to find out is to inspect the html-code with your browser.

In reply to Matthias Giger

Re: Removing the border around the course image

by Reza Dan -

Hi Matthias,


I used firefox inspector to find the image selector and used the following to no avail:

img.courseimage{border: none !important;}

I had the same result without '!important'.


Reza