background image in h2 not showing up

I would classify myself as a beginner and discover answers through trial and error. However I can’t solve this. I would like an image to be behind the h2 text on my homepage. I have tried placing it everywhere within here and nothing makes it show up.

Here is my site: http://bitsybride.com

Read More

Here is what I want: http://bitsybride.com/Image8.png

Here is the relevant css:

.smallpost {
overflow:hidden;
width:730px;
padding-bottom:0;}

ul.smallpost li {
width:290px;
height:130px;
margin:0 40px 60px 0;
padding:0px 0px 0px 0px;
position:relative;
float:left;
background: url(images/pink ribbon.png);}

ul.smallpost h2 {
font-size: 12pt;
line-height: 0pt;
margin: 0 0 0px 0;
padding:5px 0px 100px 15px;
letter-spacing: -1px;} 


ul.smallpost li img {
margin:-20px 0 15px -20px;
width:280px;
height:150px;
overflow:hidden; 
    padding: 4px;
margin: 1px 1px 4px 1px;
overflow: hidden;
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /*-moz-border-radius: 5px;-khtml-    border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;*/
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
-o-linear-gradient(#2F2727, #1a82f7);
background:
-moz-linear-gradient(center top , #FFFFFF, #EFEFEF) repeat scroll 0 0 transparent
;
background: -webkit-gradient(linear, left top, left bottom,
from(#fff),
color-stop(0.5, #fff),
to(#EFEFEF)
);
filter: progid: DXImageTransform.Microsoft.Gradient(StartColorStr='#ffffffff', EndColorStr='#EFEFEFEF');
-ms-filter: "progid: DXImageTransform.Microsoft.gradient(startColorstr=#ffffffff, endColorstr=#EFEFEFEF)";
-o-linear-gradient(top, #dcdcdc, #c6c6c6);
border: 1px solid #FFFFFF;
z-index: 5;}

Help!

Related posts

Leave a Reply

2 comments

  1. If you want your h2’s to have a background image, try this in your ul.smallpost h2

    background-image: url('/wp-content/uploads/2012/05/bitsy2.png');
    

    or wherever your image is.

  2. use display:inline-block in your h2 tag

    ul.smallpost li {
    width:290px;
    height:130px;
    margin:0 40px 60px 0;
    padding:0px 0px 0px 0px;
    position:relative;
    float:left;
    }
    
    ul.smallpost h2 {
    font-size: 12pt;
    line-height: 0pt;
    margin: 0 0 0px 0;
    padding:5px 0px 100px 15px;
    letter-spacing: -1px;
    background: url(images/pink ribbon.png);
    display:inline-block;
    }