Shopify gives error trying to save when adding code to CSS section

Shopify gives error trying to save when adding code to CSS section

User1543
Visitor
1 0 1

Hello community,

I'm trying to add a fading line at the bottom of a specific section, however, when It try to add my code it shows up correctly but gives an error message when trying to save.

My code

 

 

.collection {
  position: relative;
}

.collection::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, white, transparent);
  pointer-events: none;
}

 

 

 

User1543_0-1740227843044.png

User1543_1-1740227882873.pngUser1543_2-1740227897305.png



Thank you!

 

Replies 3 (3)

LizHoang
Shopify Partner
1251 159 196

Hi @User1543 

 

I think you should add the code in base.css file. Don't should add in that.

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Check our Joy Rewards & Loyalty Program

devcoders
Shopify Partner
1162 139 330

Hello @User1543 

 

  1. Add CSS in "theme.css" or "base.css"
  2. Go to Online Store > Themes.
  3. Click Edit Code for your active theme.
  4. Find "theme.css" or "base.css" inside Assets.
  5. Scroll to the bottom and paste your CSS code.
  6. Save the file.
Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!

DaisyVo
Shopify Partner
4338 482 568

Hi @User1543 

I hope you are well. You can follow our instructions below:
1/ Shopify admin > Online store > Edit code: https://prnt.sc/M4p-gua99Uf4
2/ Search for "theme.liquid" file: https://prnt.sc/b6xveIKe-Rh2
3/ Open the file and search for </head> tag and add the following code above </head> tag: https://prnt.sc/KWtKYyZkDtYJ

 

Here is the code for Step 3:

 

{% style %}
put your code here
{% endstyle %}

 

 

Please let me know if it works. Thank you!Best,
Daisy - Avada Support Team.

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution