#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    CSS no longer showimg images


    Hi guys, I am having a very strange issue. I have been using background images on CSS. But today it does not want to work. Nothing shows up.

    Here is the html

    Code:
    <!DOCTYPE html> 
    <html> 
    <head> 	
    <meta charset="UTF-8"> 	
    <link type="text/css" rel="stylesheet" href="css.css"/> 	<title>Ucast</title> 
    </head> 
    <body>  
    <div class="container"> 	
    <header> 		
    <h1>Ucast</h1> 	
    </header> 
    </div>     
    </body> 
    </html>
    This is the CSS so simple

    Code:
    header h1 { 	
    background:url(img/logo.png); 
    }
    This is very strange i have used this same code many times before without an issue. and yet no it won't work.

    Anyone see the issue, the one thing I have seen with code is it is always the simple thing that I miss! But who knows.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    294
    Rep Power
    8
    Where is your CSS file in relation to your img folder?

    Regards,

    NM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0
    the .css file is in a folder on the Desktop. It goes.

    folder>img

    .css and .html are all in the folder. All images are in img folder.


    While taking a look at the page in a browser that is an error in the Web Console that reads

    expected 'color' but found 'url'. Error in parsing value for 'background' Declaration dropped.

    This seems a little strange. What is wrong with the line of code?
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    310
    Rep Power
    162
    Originally Posted by Border180
    Code:
    header h1 { 	
    background:url(img/logo.png); 
    }
    This is very strange i have used this same code many times before without an issue. and yet no it won't work.

    Anyone see the issue, the one thing I have seen with code is it is always the simple thing that I miss! But who knows.
    Nobody likes it when that happens and end up searching for hours to find out what the problem is. Would this fix the issue?

    Code:
    header h1 {
    background-image:url(img/logo.png);
    }
    Last edited by LDHosting; June 6th, 2013 at 03:35 AM.
    Quality European Web Hosting - LDHosting.com
    High Quality, Low Cost Web Hosting Services
    www.ldhosting.com

IMN logo majestic logo threadwatch logo seochat tools logo