- This topic is empty.
-
AuthorPosts
-
August 10, 2012 at 8:04 am #39314Ensiferum77Participant
Hi guys,
I have some problem with appearing of images. First of all i have body image, here is the css:body {
margin-top: 60px;
padding: 0;
background: #FFFFFF url(../images/img01.gif) repeat;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #181B20;
}Next, i have 3 images and i like to make one big content with this images in the center. First i put image for header, image for center content and image for footer. So i put this css:
.header
{
position:absolute;
background: url(../images/header.gif) repeat-y center top;
}
.content
{
position:absolute;
background: url(../images/content.gif) no-repeat center top;
}
.footer
{
position:absolute;
background: url(../images/footer.gif) no-repeat center bottom;
}Here i run into problem. None of images like to show on my page. I’ve try different solution with position, also with z-index but none of this help.
Please help if you run in same or similar problem.
Cheers
August 10, 2012 at 8:14 am #107671Paulie_DMemberDo you have a link?
My best guess is that you have mislinked the images.
August 10, 2012 at 8:25 am #107672Ensiferum77ParticipantI try the other way: url(c:/………/ …. / ) where is the true location on my hd of the images. interesting is, that i haved try with id rather than use class inside div so with id some of the images show but only if i put some
tags and put some text but still so much bugs.August 10, 2012 at 8:26 am #107673alextashParticipantI think you have to set width and height for your sections (header, footer. …) to see the images
August 10, 2012 at 9:35 am #107677Paulie_DMember@alextash So true. I assumed that this was a given.
My bad.
@Ensiferum77 Trying putting your code & css in CodepenAugust 10, 2012 at 10:42 am #107682Ensiferum77ParticipantHow this code can work?
but this code dont work?? :)
.img1{background: url(../images/header.gif);background-repeat:no-repeat; background-position: center top;}
August 10, 2012 at 10:47 am #107684Paulie_DMemberLike I said, put in in Codepen or give us a link.
My only thought from the above is that you haven’t applied the class or added heights/widths to you elements that are supposed to have the background image.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.