Search code examples
cssbackground-image

How do i make the background-image visible in my css


I have three files in my public_html root:

public_html:
  index.htm 
  deer.jpg 
  style.css

In the css.style i have

body{
    background-image:url('deer.jpg');
}

In the index.htm, i have

<head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
    <title>AAA</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

<h1>Filling the Gap betwwen ASIC Design Education and Industry</h1>
<h2>Interview Questions/Industry Case Study</h2>

<ul>
    <li><a href="asic/index.htm">Asic Design</a></li>  
    <li><a href="rental/rental.htm">Rental Management</a></li>  
</ul>
<p></p>
</body>
</html>

Why the picture doesn't show up in my webpage?


Solution

  • Try using background: url('deer.jpg') no-repeat; instead of background-image