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 :)
October 28, 2012 at 8:49 pm
#112850
Member
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.