Target specific section with CSS Styling | Community
Skip to main content

Target specific section with CSS Styling

  • June 17, 2021
  • 6 replies
  • 0 views

is there a way to style my section elements differently for different sections?

6 replies

Trapta
  • June 17, 2021

Hi @Andrew Steier,

You can use the CSS class in order to create different styles and using {{#is id 'SECTION_ID'}}  CLASS_NAME {{/is}} you can add the class as per your need.

Let me know if this solves your issue.

Thanks


  • Author
  • June 23, 2021

so presumably that's the same for categories as well, right?

so you define this in the section_page.hbs, yea?


Trapta
  • June 23, 2021

Yes, it's the same for categories as well. The above code is to design sections but you can use {{category.id}} to design the category.

Thanks

Trapta


  • Author
  • July 28, 2021

@Trapta
Apologies for the delay - went out on Paternity leave.

{{#is category.id '12345'}} class='classId'{{/is}}  -- -- correct?
I'm not clear on the syntax for mapping to the class ID here.

 

 


Trapta
  • July 28, 2021

Hi @Andrew Steier,

Yes, you are right on the syntax part. That's how you have to mention it in the code. Also, congratulations :)

Thanks


  • Author
  • July 29, 2021

thanks! ;D