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

        • lsaprc
          CAREER IN GRAPHIC DESIGN
          lsaprc
          Hi,
          I have recently completed my graphic design university degree.

          I applied for a job to do administration work at a professional and well known creative agency.
          There would...
          Today, 05:52 PM
        • eyoungren
          Reply to InDesign file frozen!
          eyoungren
          Hopefully OP posts back soon if he has a solution. I recently (last week) abandoned a new install of InDesign CC 2017 for our old version of CS4 for the same reason as OP, unworkable documents. CS4 appears...
          Today, 04:42 PM
        • eyoungren
          Reply to Hi from Phoenix!
          eyoungren
          Well, thanks! I appreciate that. I try to help and I try to learn. It looks like there are several people here I can learn from so right now I'm enjoying myself....
          Today, 03:19 PM
        • Possumgal
          Reply to Hi from Phoenix!
          Possumgal
          Hi, eyoungren. I've seen you on other forums for years, and I know you'll be a great addition to this one. You always give really useful and knowledgeable advice.
          Today, 02:14 PM
        • Obsidian86
          Reply to How to change the size of this slogan on Wordpress?
          Obsidian86
          You can edit the template CSS on line 944

          .site-description {
          position: absolute;
          bottom: 24px;
          left: 145px;
          margin: 0;
          padding: 0;
          ...
          Today, 11:04 AM
        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