Why isn't my div showing up when i run my code in my browser?


#1

HTML Code:

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="CSSTEST.css">
	<link rel="stylesheet" href="Javascript.js">
	
     <title> Kat's Webpage </title>
  </head>
  <body>
     <h1> Kat </h1>
	 <img src= "http://wac.450f.edgecastcdn.net/80450F/katsfm.com/files/2013/02/kitten.jpg" width= "200px"/>
    <p> Hello everyone my name is Kat!</p>
	<hr> 
	Hobbies:
	
	 <ul>
	    <li id= "Black"> Soccer </li>
		<li id= "Bow"> Archery </li>
	    <li id = "Color"> Coloring </li>
	 </ul>
	<hr>
	 <p> i can do many different things, like <strong>sing</strong> and play <strong>piano</strong>. 
    </br>
    <p> I have many different websites that i like to visit. Here are a few: </br> </p>
    <ol>
        <li> <a href="http://www.picmonkey.com/"> Pic Monkey</a></li>
		This is a really great website. You can put different effects on pictures, and make cool collages. Even though you have to pay for most of the features it offers, they do offer a lot of cool free ones.
		<li> <a href= "https://ohmy.disney.com/"> Oh My Disney</a></li>
		Looking for anything Disney? This is the place to go for all kinds of Dinsey Insiders, New Trailers, Quizzes, and MORE!
	</ol>	
	
	<div>
	
	</div>
  </body>
   
   
 </html>

CSS Code:

p {
	font-family: Garamond, serif;
	font-size: 18px;
}

h1 {
	
	font-size: 20px
}


#Bow {
	color: red;
}

#Color {
	color: #7ec0ee;
}

div {
	
	background-color: blue;
}

I am using Notepad++ to write my code and the Microsoft Edge browser to run it in. Usually, when I run code in Codecademy, the div shows up. But the only way to make the div show up when I run this code in my browser is if I put text in the div. I don't want text. I just want the background color. Why isn't it working? Is it because of the browser I use? Please help.

Kat


#2

try to give your div a height. It doesn't have a height by default, and so far i know doesn't have in the lessons either


#3

it works! Thanks so much!!! :joy::grinning::wink: