Background colour not going across

Solved

Background colour not going across

kirsten11123
Shopify Partner
51 0 18

Hi - I'm using the theme 'Stiletto' and I have set certain rich text sections to have background using custom css. However no matter what I try, the background doesn't span across the full width on extra large desktop screens. Normal sized screens + mobile seem to be fine. 

Screenshot 2024-07-22 at 3.07.10 PM.png

Can you see what my issue is in the code?

https://6avus8gq4ba33xrb-88967512345.shopifypreview.com password: hellobgc1

Accepted Solution (1)

Roy-ロイ
Shopify Partner
91 19 34

This is an accepted solution.

The section seems to have the "max-width" property which is restricting it to span out completely. 
Please use the below CSS (Change the CSS selector if you want to target those two specific sections): 

[data-section-type="rich-text"] {
    max-width: unset;
}

 

Let's connect and grow your Shopify business together! 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Connect with me at: roy.solution.partner@gmail.com ( CRO | Site Speed Optimization | Custom Development )

View solution in original post

Replies 4 (4)

Dan-From-Ryviu
Shopify Partner
11349 2224 2397

Hi @kirsten11123 

You add a background for inner containers, not wrap containers. Please add this additional CSS code to your Customize CSS in Online Store > Themes > Custize > Theme settings to add background for those 2 sections. 

#shopify-section-template--23085828964633__rich_text_PaAPCx,
#shopify-section-template--23085828964633__rich_text_BkFYHf { background-color: #1f1816; }

 

- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Roy-ロイ
Shopify Partner
91 19 34

This is an accepted solution.

The section seems to have the "max-width" property which is restricting it to span out completely. 
Please use the below CSS (Change the CSS selector if you want to target those two specific sections): 

[data-section-type="rich-text"] {
    max-width: unset;
}

 

Let's connect and grow your Shopify business together! 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Connect with me at: roy.solution.partner@gmail.com ( CRO | Site Speed Optimization | Custom Development )

kirsten11123
Shopify Partner
51 0 18

This is great - thank you!

namphan
Shopify Partner
2270 296 333

Hi @kirsten11123,

Please go to Actions > Edit code > Assets > theme.css file and paste this at the bottom of the file:

.rich-text.section {
    max-width: 100%;
}
Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com