I am trying to put a background image into all articles on my website. At the moment I am achieving this by hard-coding the div tag into the body of my joomla article.

<p>{loadmodule mod_custom,ACADEMIC}</p>
<div style="background-image: url('images/M34Algebra/Academicv5.png');">
<!- content  ->
<!- content  ->
{loadmodule mod_custom,NOTES FOOTER}</p>

which generates the folloiwng


(repeating company logo so it can serve as a water mark)

I thought I could achieve this by inserting the div tag in either the header module or the footer module but putting the div tag in these moudules outputs the background image only within the scope of the header or the footer.

Can any experienced Joomla guys tell me how to do this properly? As I have over 60+ such articles I need to apply the same background image to.

Many thanks guys.

3 Answers 3


You can achieve this through CSS. In your CSS, add the following:

    background-image: url(/images/M34Algebra/Academicv5.png);

I just tried the above on your website in Google Chrome and it worked.

Make sure you clear your browser cache to make sure that the changes take effect.

  • Adding this in the CSS file only gives the background image to the div parts of the website articles. Is there any way to apply the background image to the entire article?
    – Will Kim
    Commented Mar 28, 2017 at 12:38
  • I have updated my answer - please check (just removed the div from the CSS).
    – itoctopus
    Commented Mar 28, 2017 at 14:33

As a complement or alternative to itoctopus answer you can also have different backgrounds for different menu items, you can use the page class suffix parameter of the menu item to create new CSS classes and then add styling commands in the CSS file (Joomla! docs)

  • How would you implement this? Could you please give me some codes? Thanks
    – Will Kim
    Commented Mar 28, 2017 at 3:52
  • @WillKim - docs.joomla.org/…
    – Lodder
    Commented Mar 28, 2017 at 7:39

To extend @n.h. post, and answer your comment-question this is how this works:

When you add a page class suffix for a menu item, then most templates will add this extra css class on the wrapper div element of the article, which usually has already the class item-page

So for that menu item:

<div class="item-page">

will become:

<div class="item-page yourCustomClass">

Note, that you might have to leave a space when you are typing your custom class in the page class suffix field for the menu item, in order to have your custom class added as a second class on that div, instead of concatenating the existing item-page class.

Then all you need is to target with your css those specific pages' article area with something like this:

/* Page 1 bg */
.item-page.yourCustomClass1 .article-content div {
    background-image: url(/images/bgImage1.jpg);

/* Page 2 bg */
.item-page.yourCustomClass2 .article-content div {
    background-image: url(/images/bgImage2.jpg);

If you want to target for your bg image the .article-content div element, other elements, or the whole .item-page is up to you and also depending on the results you are getting ( I haven't inspect your site ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.