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

        Advertisement

        Collapse

        Latest Topics

        Collapse

        • KitchWitch
          Reply to drawing- my beautiful girlfriend
          KitchWitch
          Hi Almogifergan 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...
          Today, 07:36 AM
        • PrintDriver
          Reply to Any ideas for a logo for a window tinting company
          PrintDriver
          If you are a designer, it is your job to come up with ideas.

          If you are not a designer, you may need to think about hiring one.

          Question, if you use a lightbulb which kind are...
          Today, 07:35 AM
        • KitchWitch
          Reply to What would $8,000 get me?
          KitchWitch
          Hi Copaaz 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 done...
          Today, 07:34 AM
        • KitchWitch
          Reply to Any ideas for a logo for a window tinting company
          KitchWitch
          Hi Yas and welcome to GDF.

          Not many of us will just give you ideas - coming up with ideas is part of the job. We are more likely to provide feedback on ideas you've come up with.
          ...
          Today, 07:33 AM
        • Raimok2
          Reply to How to edit painting?
          Raimok2
          Thank you so much, guys! That was exactly what it needed!!! You were both exactly right. And it really may look ugly, but in the apartment, it looks nice. Thanks again!...
          Today, 07:18 AM

        20% Off Sale at iStock until Sept 30, 2016
        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