Jump to content

How do I add text background to text in a banner?

Recommended Posts

  • Replies 18
  • Views 945
  • Created
  • Last Reply

@scottmcelroy Add to Home > Design > Custom CSS


/* Come to Grow */
.desc-wrapper p:first-child {
   background: #000;
}
/* Come to connect... */
.desc-wrapper p:nth-child(10n+2) {
   background: #000;
}
/* Remove spacing between comet to grow and connect */
.desc-wrapper p:first-child {
   margin-bottom: 0 !important;
}
.desc-wrapper p:nth-child(10n+2) {
   margin-top: 0 !important;
}


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

@scottmcelroy You can usebackground: rgba(227,224,215,0.5);0.5 is opacity (0 --> 1)

e3e0d7 = rgb(227,224,215)


.desc-wrapper p:nth-child(10n+2), .desc-wrapper p:first-child {
   display: inline-block;
}
/* Remove spacing between p1 and p2 */
.desc-wrapper p:nth-child(10n+2) {
   margin-top: -1px !important;
}





Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

@scottmcelroy All code


/* Come to Grow */
.desc-wrapper p:first-child {
    background: rgba(227,224,215,0.5);
   display: inline-block;
}
/* Come to connect... */
.desc-wrapper p:nth-child(10n+2) {
     background: rgba(227,224,215,0.5);
    display: inline-block;
}
/* Remove spacing between comet to grow and connect */
.desc-wrapper p:first-child {
    margin-bottom: 0 !important;
}
.desc-wrapper p:nth-child(10n+2) {
    margin-top: -5px !important;
}


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.