Forums

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

Home Forums CSS NEED HELP! Image Not Showing??

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35709
    yashar
    Participant

    hello,
    i have several html pages and one external css plus javascript for menu i am adding background img in external css but is not showing it on the website can someone figure out the issue and let me know,

    [CODE DELETED – please only post code specific to your problem]

    #92997
    TheDoc
    Member

    1) Only post the relevant CSS

    2) Without a link to the live site, it’ll be hard to discern

    3) I can nearly 99% guarantee that it has something to do with the path to the image that you’ve entered.

    #92999
    yashar
    Participant

    hello,
    thanks, what about

    background-image:url(labandastgah/red.png); labandastgah being a folder in a directory which contains the image red.png
    can you be more specific thanks.

    #93099
    TheDoc
    Member

    I’m saying that the path that you are using isn’t the actual path to the image.

    Where is your CSS file located (what is the path) and where is your image located (what is the path)?

    /images/red.png
    images/red.png
    ../images/red.png
    ../../images/red.png

    Those are all targeting different folders on the same server, so it’s important to know how they work.

    /images – targets a folder of ‘images’ in the root
    images – targets a folder of ‘images’ in the same location as the CSS file
    ../images – targets a folder of ‘images’ one level up
    ../../images – targets a folder of ‘images’ two levels up

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