html - How do I get my backgroun image to display behind the text in my header using CSS3? -
i tried checking ensure image referenced can display in banner nil seems work.
here html:
<header id="header"> <h1> loved place on earth</h1> </header>
my css3:
header {font-family: journalregular; font-size: 250%; text-align: center; color:#b22222; **background-image: url("images/cover.jpg");}**
the image in right folder, , using right extension. tried url without quotes well. help!
first, image path have refered in relation of css path, in code example, image located on image folder , shared same root of css file.
if css locadte example:
rootfolder/css/nameofcssfile.css
and images located in:
rootfoder/images/backgroundfile.jpg
so reference have be:
background-image: url(../images/cover.jpg);
image path or without quotes, prefer without quotes
html css css3
No comments:
Post a Comment