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!