0

Trying to get a logo onto a website. Eventually use it as a link to the main page. But it wont even show up when I use css. It does link when I use HTML So i know its not the image. CSS is in its own folder, and Image is in its own folder. So I dont think i have the url incorrect.

CSS

.logo {

    background-image: url(../images/logo.png);
    display:block;
    margin: 0px auto;
    padding: 0px 15px 0px 15px;
    border: none;
    width: 1000px;
    height: 100px; 
}

HTML

<body>

    <div class="logo">

    </div>  

</body>

Feel like Ive tried everything.

Steven Doggart
  • 43,358
  • 8
  • 68
  • 105
pewpew
  • 700
  • 2
  • 9
  • 32
  • Because it's a local file. Locally you need to say `file:///imagePath` (assuming this is on your computer). Anyways this is a duplicate, [more information here](http://stackoverflow.com/questions/6401865/css-background-image-url-failing-to-load). – Spencer Wieczorek Nov 02 '14 at 04:11

2 Answers2

1

HERE IS THE ANSWER

css

.logo {

background: url(../images/logo.png) ;
background-size: 200px 200px;
width: 200px;
height:200px;

}

pewpew
  • 700
  • 2
  • 9
  • 32
0

Try changing background-image to background and adding quotation marks.

.logo{ 
 background: url('../images/logo.png');
Ana Isabel
  • 931
  • 1
  • 11
  • 21