PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, June 30, 2022

[FIXED] How to add background color to section in shopify liquid

 June 30, 2022     html, liquid, shopify     No comments   

Issue

I am trying to add a background color to my shopify slideshow section but it doesn’t work.

I have tried to add a new div:

<div style="background-color:{{block.settings.color_accent}}">

But I get broken html error. What am I doing wrong? Can someone tell me how to fix it?


Solution

You can try to below code and must have to add this code to you have created block schema code:

{
  "type": "color",
  "id": "color_accent",
  "label": "Buttons color",
  "default": "#FFFFFF"
}

And you need to create a div:

<div style="background-color:{{block.settings.color_accent}}">


Answered By - Dotsquares
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing