Forums

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

Home Forums CSS ? BG image on headings, when image is taller than headings? Re: ? BG image on headings, when image is taller than headings?

#64412
pixlor
Member

:) That fixes the heading and image, thank you!

Now…is there any way to close the gap between the heading and the paragraph text? I tried giving the first paragraph a negative margin, but it didn’t move. Would that be because of the height/min-height on the heading?

Code:
#content h2 {
background: url(images/h2bg.png) no-repeat #fbf8f2;
padding-top: 30px; /* this will push the text down from the top */
padding-left: 60px; /* this will push the text right from the left */
left: -60px;
position: relative;
min-height: 75px; /* height of the image */
height: auto !important; /* ie6 */
height: 75px; /* height of image, also for ie6 */
}

#content p {
margin: 0 0 1.5em 25px;
}

#content h2 p {
margin: -75px 0 1.5em 25px;
}