How to change background browser color in Cassiopeia Topic is solved

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
taurus1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Feb 18, 2022 6:31 pm

How to change background browser color in Cassiopeia

Post by taurus1234 » Thu Mar 07, 2024 8:19 pm

I'm putting the finishing touches on a site I am migrating from Joomla 3 to 4. Cassiopeia is in the blog layout.

How can I change the "background" (I think it is considered the browser area or viewport) that surrounds all the modules from a very light gray or white to another color like cream? I've been using a new user.css file in the appropriate template folder and have made some other css changes that work fine. But I can't figure out how to change this color, even when I use the "inspect" feature.The closest I can come to what I want is making all the background cream (not the modules like sidebar-left, they stay the way they are originally intended) but it also changes the blog posting area (where new information appears via posted articles) to cream, too. I wanted to keep that blog area "white" or light grey just like the module areas.

What I used to get the cream color is this

body {
background-color: #fffdf7
}

Can anyone point me in the right direction? I am not a website developer, as if that isn't obvious. LOL

Thank you!

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2748
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: How to change background browser color in Cassiopeia

Post by ceford » Fri Mar 08, 2024 8:21 am

Having changed the body background colour you need a rule to change the container-component background colour and add some padding:

.container component {
background-color: white;
padding: 0 0.5em;
}

taurus1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Feb 18, 2022 6:31 pm

Re: How to change background browser color in Cassiopeia

Post by taurus1234 » Fri Mar 08, 2024 1:21 pm

Thank you ceford for your response.

I went ahead and put your recommendations into user.css but it didn't change anything. I still have the cream color showing in the blog content area. Does this code go into a different file other than user.css?

Thank you

DJBenz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 184
Joined: Tue Jan 20, 2009 8:34 am
Contact:

Re: How to change background browser color in Cassiopeia

Post by DJBenz » Fri Mar 08, 2024 1:32 pm

This is a really good guide to customising Cassiopeia: https://coolcat-creations.com/en/blog/c ... a-template

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2748
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: How to change background browser color in Cassiopeia

Post by ceford » Fri Mar 08, 2024 2:14 pm

Oops, I missed the - in the .container-component rule

Code: Select all

.container-component {
    background-color: white;
    padding: 0 0.5em;
}

taurus1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Feb 18, 2022 6:31 pm

Re: How to change background browser color in Cassiopeia

Post by taurus1234 » Fri Mar 08, 2024 3:02 pm

Thank you, ceford, this works like a charm! It's exactly what I needed.

I appreciate you taking the time to answer.

Have a lovely day!

taurus1234
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Feb 18, 2022 6:31 pm

Re: How to change background browser color in Cassiopeia

Post by taurus1234 » Fri Mar 08, 2024 3:11 pm

Also, DJBenz, thank you for posting the link to the CoolCatCreations website. I am familiar with that site and actually used a lot of that info to help me get to where I am in the Joomla 4 update "design" process, after I initially used the MigrateMe 4 app to do the actual migrate. (Migrate Me 4 was totally wonderful after I tried to migrate on my own but failed. I highly recommend it for others, even though it costs a little.) I also watched CoolCat's video from the New Jersey group about a week ago. Very good info for others who are inexperienced like myself ... so very helpful.

Thank you for posting in answer to my question.


Post Reply

Return to “Templates for Joomla! 4.x”