chrisshaddock Posted March 8, 2022 Share Posted March 8, 2022 I have this code section[data-section-id="6227c317dd10fe3ede293536"] h4 { background-color: #512d4f; padding: 10px; } But i have multiple sections where I want to apply this code. Instead of repeating the code section[data-section-id="6227c317dd10fe3ede293536"] h4 { background-color: #512d4f; padding: 10px; } section[data-section-id="6227e125a2838046a12e5f32"] h4 { background-color: #512d4f; padding: 10px; } How can I shorten this? Also, if you can point me to a resources to lear that kind of thing that would be helpful. Thanks Link to comment
Jia Posted March 9, 2022 Share Posted March 9, 2022 6 hours ago, chrisshaddock said: I have this code section[data-section-id="6227c317dd10fe3ede293536"] h4 { background-color: #512d4f; padding: 10px; } But i have multiple sections where I want to apply this code. Instead of repeating the code section[data-section-id="6227c317dd10fe3ede293536"] h4 { background-color: #512d4f; padding: 10px; } section[data-section-id="6227e125a2838046a12e5f32"] h4 { background-color: #512d4f; padding: 10px; } How can I shorten this? Also, if you can point me to a resources to lear that kind of thing that would be helpful. Thanks Hi, you can use commas to select multiple sections. The code will look like this: section[data-section-id="6227c317dd10fe3ede293536"] h4, section[data-section-id="6227e125a2838046a12e5f32"] h4 { background-color: #512d4f; padding: 10px; } Florian 1 Please give this a 👍 if it helps www.sevenstars.studiowww.instagram.com/sevenstars.studio Link to comment
chrisshaddock Posted March 9, 2022 Author Share Posted March 9, 2022 Thank you. Jia 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment