codehaven - php snippets - coding help
Generic filters
Exact matches only
  • Add background colour to text only, not whole line

    16th January 2020


    Css - Codehaven

    Again this one is simple and used very often but can take a while to figure out, unless you know the easy way.
    To add background colour to the text only should be easy, but it adds it to the whole element usually!
    Just add a span inside of the element, and talk directly to that span instead.

    Was this code snippet helpful?