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

        • HotButton
          Reply to File for T-Shirt Printing
          HotButton
          ^Right. There is no "standard." It depends entirely upon the methods and equipment used, factored by the idiosyncrasies of the shop (and they are all different). The printer will supply an artwork...
          Today, 10:42 AM
        • kemingMatters
          Reply to File for T-Shirt Printing
          kemingMatters
          Ask where you are getting it printed, there are a lot of different setups and workflows, some printers prefer different things, it's always best just to ask.
          Today, 10:20 AM
        • HotButton
          Reply to I want to fade my background image. How could i do that using adobe photoshop.
          HotButton
          True PD. So then a few more related tidbits might be in order:
          • Every Photoshop image has an opacity-locked, can't-be-layer-masked "Background" (named) layer by default...
            • But it doesn't
          ...
          Today, 09:55 AM
        • HotButton
          Comment on Playing Cards
          HotButton
          It is interesting though, how the pattern frequency affects the perceived overall contrast.

          Coincidentally, one of my first thoughts about the Q-Hearts was ''I wonder what it would look...
          Today, 09:47 AM
        • Cosmo
          Comment on Online School recommendations?
          Cosmo
          And some friends do things without asking, and then come to other friends to fix the crappy logos they got on Etsy because all of a sudden that ''designer'' is nowhere to be found...
          Today, 09:32 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