Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren 12 posts 32 karma points
    Feb 21, 2012 @ 13:42
    Darren
    0

    How do I reference images from my css?

    Hi all,

    my Image has an id of 1119. It's sitting under the media folder.

    For example, I have tried

    background-image: url('Media/menuarrow.gif');

    background-image: url('Media/1119/menuarrow.gif');

    I have also tried \media\268\menuearrow.gif which is a direct path to the file

    any ideas anyone please :-)

     

     

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 21, 2012 @ 14:03
    Thomas Höhler
    0

    Hi Darren

    If you are using a link without beginning slash it's a relative link. Therefore that your css file is in the css folder it searches www.yourdomain.com/css/Media/1119/menuarrow.gif. Use instead correct relative urls or absolute urls

    correct relative url: url("../Media/1119/menuarrow.gif")

    absolute link: url("/Media/1119/menuarrow.gif")

    hth, Thomas

  • Darren 12 posts 32 karma points
    Feb 21, 2012 @ 14:15
    Darren
    0

    thanks for that, think I was having a 'doh' moment, :-) . thanks for your help Thomas

     

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 21, 2012 @ 14:18
    Thomas Höhler
    0

    LOL, it's like a monday, isn't it?

Please Sign in or register to post replies

Write your reply to:

Draft