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

        • PanToshi
          Comment on Graphic Designer's In Math
          PanToshi
          Sounds like a fun assignment for all involved. Bravo and thanks for teaching our kids math!
          Today, 10:18 PM
        • Daisy B.
          Comment on Graphic Designer's In Math
          Daisy B.
          Thank you for answering my questions. The project that I'm working on is about how math is used in almost every profession, so each student has to pick a job and then research how math is used in that...
          Today, 10:14 PM
        • salsa
          Reply to Graphic Designer's In Math
          salsa
          What kind of simple math do you use on a regular basis whilst doing your job?
          addition, subtraction, multiplication, division, fractions & percentages, ratios, geometry, basic algebra, patterns/sequences...
          Today, 05:31 PM
        • PanToshi
          Reply to Anyone w/Experience Working at a Design Agency?
          PanToshi
          In my area of the country, there are an abundance of this.

          Believe me, despite over 12 years of agency experience and 15 years being a ''freelancer'', even I have encountered this bias. Especially...
          Today, 03:10 PM
        • B
          Reply to Anyone w/Experience Working at a Design Agency?
          B
          I wouldn't say it means nothing. If it's coupled with all the other things, like internships, actual employment and education, it definitely counts for something.

          When I interview people...
          Today, 02:33 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