Announcement

Collapse
No announcement yet.

url in css file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • url in css file

    Need help with a background image in the CSS file. I have just tried uploading the site I am doing but the background images wont work. The only thing it can be is the url in the style sheet.

    The image path will only work if set out in the manner:

    Code:
    background-image: url(


    It wont work like this:
    Code:
    background-image: url(318734_7189small.jpg);


    *I having included the rest of the code*
    Could that be the reason that is stopping it displaying when uploaded?


    Any ideas


  • #2
    are the image and the style sheet in the same folder?

    Comment


    • #3
      that's a path issue - if you have your images in a folder you need to point to that folder.

      includes won't make any difference as they are parsed as HTML. Are you testing locally? Have you cleared your cache?

      Comment


      • #4
        I agree. Make sure that your images are in the same folder as your css code, or try putting a slash in front of the filename, so it will be absolute in the main folder, which is what it looks like:

        Code:
        background-image: url(/318734_7189small.jpg);
        WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.

        Comment

        Search

        Collapse

        Sponsor

        Collapse

        Incredible Stock

        Latest Topics

        Collapse

        • Artsychica
          Reply to Google Fiber
          Artsychica
          I'm in Charlotte where they've installed it but it never made it to my house. Supposedly the lots in my neighborhood are too spaced out to make installation worth it.
          Yesterday, 08:37 PM
        • Artsychica
          Reply to What do you think about design of this site
          Artsychica
          It also feels a bit busy and unorganized. I didn't really get graphic design from seeing it. That said, it does look professional. I'm just not fully getting the intended message from what you've pre...
          Yesterday, 08:27 PM
        • Artsychica
          Reply to Dream jobs?
          Artsychica
          I'm a student as well so my knowledge is limited, but as it stands today I'd really like to find a job in an agency that does food related marketing projects. We actually have a company in Charlotte that...
          Yesterday, 08:21 PM
        • KitchWitch
          Reply to Hi guys im new
          KitchWitch
          Hi Penguinruwan and welcome to GDF.

          We ask all new members to read very important links here and here. These explain the rules, how the forum runs and a few inside jokes. No, you haven't...
          Yesterday, 01:24 PM
        • PrintDriver
          Reply to Hi guys im new
          PrintDriver
          Not quite sure what to tell you.
          The profession of graphic design is not learned by watching tricks on Youtube or learning the software buttons. There is quite a bit of theory that goes into a good...
          Yesterday, 01:22 PM
        GDF A division of Mediabistro Holdings Adweek | Mediabistro | Clio | Film Expo Group Contact Us | Terms of Use | Privacy Policy Copyright 2016 Mediabistro Holdings
        Working...
        X