Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorericm
    • CommentTimeSep 27th 2008
     permalink
    Just started an attempt at laying out a page entirely in CSS, but I've run into trouble with displaying background images and I can't for the life of me figure out why. You can see the page (XHTML Strict & CSS) here:

    http://74.52.119.146/~emilford/
    • CommentAuthordavist11
    • CommentTimeSep 27th 2008
     permalink
    Because you are getting 404 errors with all of the images. Download Firebug and you can see all of the images are loading from these directories:

    http://74.52.119.146/~emilford/_css/images/
    http://74.52.119.146/~emilford/_css/_img/

    Is that where the images really are?
    • CommentAuthorericm
    • CommentTimeSep 27th 2008
     permalink
    No, that's not where they are. They are at the root left. And I assumed that since the page being loaded was also at the root level I would be able to access the images direct as ./ not ../. But sure enough, I changed it to ../ and the images appeared, so I guess the url( ) is relative to the css location, not the loaded page location. Thanks.

    Also, I'm not too familiar with Firebug. It's installed now. What tab did you use to find the images?
    • CommentAuthorFLEB
    • CommentTimeOct 3rd 2008
     permalink
    Bingo. URL references are relative to the CSS file, not the calling HTML file. This is a good thing-- it allows you to re-use a CSS file from many different HTML files in different directories.
Add your comments
    Username Password
  • Format comments as (Help)