Omar Al-Ali Omar Al-Ali - 1 year ago 103
CSS Question

div class logo isn't showing

I am having a problem with showing the logo. Here's my html code:

<!doctype html>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/main.css">
<div class="logo"></div>


Here's the CSS code:

body {
background: #43C6DB;

.logo {
background: url('../logo.png') no-repeat;'

Answer Source

NOTE: To avoid confusion, this was made the accepted answer but, in the comments, the questioner states it didn't solve the problem and he eventually posted the real solution as an answer that he did not accept. --Rob

Div elements by default have no height unless you explicitly specify it. You could put your logo as an image in the div which would give you more control over how it looks inside your div. But to solve your problem you can add this to your css.

.logo {
background: url('../images/logo.png') no-repeat;
height:100px; /*Height of your image*/

Here's a quick example

Cheers and happy coding.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download