Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Text Background Colour Effect

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37440
    ginj
    Member

    Hi,

    I’m trying to find a way of creating a Dymo style background colour effect on some title elements.

    There are a couple of solutions out there, but I can’t find one which works for multiple lines of text.

    I’ve created a span inside a header tag, applied padding and a background colour which works fine for a single line, however as soon as the text breaks for a new line, I loose any left padding as this only applies to the start and end of the span. I want the effect to work on a dynamic site, so I think it may need JS to manipulate the title element.

    Hopefully someone has a solution, its driving me nuts!

    Cheers

    Ginj

    #100398
    ginj
    Member

    Ha,

    no sooner had I asked this, I found a solution:

    http://kenneth.kufluk.com/blog/2010/04/building-mclaren-com-part1-html/

    Hope this helps someone else after this effect.

    Ginj

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.