kevp75
asked on
Background Image for H2
I have a situation, in which I am using H2 for headers of a page.
this works:
h2 {
font-size: 110%;
background-image:url(/imag es/bluBar. gif);
/*background:url(/images/c orner.gif) no-repeat top right;*/
border-bottom:1px solid #0099FF;
padding:2px 0px 2px 5px;
margin:0;
}
however, you can see the commented area is another image that makes it look like there is an angled corner. However, I am obliviosly going about this the wrong way, because an element cannot have 2 background images.
How can I work around this? I have tried making a div with the corner bg image, and tried wrapping the H2 in it, no dice.......
this works:
h2 {
font-size: 110%;
background-image:url(/imag
/*background:url(/images/c
border-bottom:1px solid #0099FF;
padding:2px 0px 2px 5px;
margin:0;
}
however, you can see the commented area is another image that makes it look like there is an angled corner. However, I am obliviosly going about this the wrong way, because an element cannot have 2 background images.
How can I work around this? I have tried making a div with the corner bg image, and tried wrapping the H2 in it, no dice.......
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
h2 {
font-size: 110%;
background-image:url(/imag
/*background: #C6D5FD url(/images/corner.gif) no-repeat top right;*/
border-bottom:1px solid #0099FF;
padding:2px 0px 2px 5px;
margin:0;
}
h2 div {
background:url(/images/cor
position:relative;
top:-2px;
padding-top:3px;
}
then for the H2 I do this
<h2><div>Header Text</div></h2>