Forums

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

Home Forums CSS add background image to h2 with padding? quick fix, i hope :) Re: add background image to h2 with padding? quick fix, i hope :)

#112850

Change:

background: url(http://www.sacredjourney.com/wp-content/uploads/2012/10/tsj-bullet.png) left center no-repeat;

To:

background: url(http://www.sacredjourney.com/wp-content/uploads/2012/10/tsj-bullet.png) 15px center no-repeat;

I think that’s what you are after?

Basically, we are telling the background image to sit 15px from the left of the container, instead of hard up against it.

Also, for future reference, it is often easier to give the parent element padding instead of each child element. That would have also avoided this issue.