Forums

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

Home Forums CSS Images don’t appear

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39314
    Ensiferum77
    Participant

    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

    #107671
    Paulie_D
    Member

    Do you have a link?

    My best guess is that you have mislinked the images.

    #107672
    Ensiferum77
    Participant

    I 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.

    #107673
    alextash
    Participant

    I think you have to set width and height for your sections (header, footer. …) to see the images

    #107677
    Paulie_D
    Member

    @alextash So true. I assumed that this was a given.

    My bad.


    @Ensiferum77
    Trying putting your code & css in Codepen

    #107682
    Ensiferum77
    Participant

    How this code can work?

     

    but this code dont work?? :)

    .img1{background: url(../images/header.gif);background-repeat:no-repeat; background-position: center top;}
    #107684
    Paulie_D
    Member

    Like 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.