1. FCPeggy
  2. Sherlock Holmes
  3. Commercial Templates
  4. Sunday, 27 May 2018
  5.  Subscribe via email
Hi,
I've created this code in Scarlett (would apply to other templates here?)

1. Question

#container_main {
background-image: url(images/backgrounds/grass.jpg) !important;
background-repeat: repeat;
}

It only creates a repeating pattern on the home/index.php page but not the other pages.
How can I get the background to show on all pages in my menu?

2. Question - is it possible to have a different #container_main repeat background on different pages using CSS with Page Suffix used?
I've turned on Page Suffix in the menu items:

Home - home = .home (uses image 1)
About - about = .about (uses image 2)
Directions - directions = .directions (uses image 3)

I'm getting lost researching on the internet.
Many thanks for any help,
Peggy
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

1. Try using the full URL to your image..

Eg.

#container_main {
background-image: url(https://www.yoursite.com/images/backgrounds/grass.jpg) !important;
background-repeat: repeat;
}


2. As Joomla adds the page class to the component area rather than to the body, I am sorry to say this is not possible. I have changed this in Joomla 4 (https://github.com/joomla/joomla-cms/pull/18967) however that is a few months away. Your only option is to create 2 template styles with the above CSS.

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you again - was not aware of using duplicate template styles. I feel like I have a brand new box of crayons to colour with.
Yaaaay! Doing my Happy Happy Dance here!
Yaaaaay!
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
:)

Glad to hear you found a solution. Thank you for the update!

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok