Forums

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

Home Forums CSS Alter background image depending on length of text. Re: Alter background image depending on length of text.

#114432
Paulie_D
Member

If you mean this img

Then it’s a ‘cheat’ if you will.

The way it’s done is to have a span which only uses the left part of the image as it’s background.

The span is wrapped around a link which uses the right end of the image as it’s bg.

The rest is done with padding/margins.