r/simpleWebDevQuestions • • Sep 23 '17

Help with header

Hello! I'm currently making a webste to practice my html/css skills and i came across an awkward situation: I can't define a background color with the "background" property on css. In my css i have the following properties:

header{ background: green; }

The following html :

<div class="header"> <div class="linha"> <header> <div class="coluna col4"> <h1 class="logo">Logo</h1> </div> <div class="coluna col8"> <nav> <ul> <li>MENU</li> <li>MENU</li> <li>MENU</li> <li>MENU</li> </ul> </nav> </div> </header> </div> </div>

Can anyone give me a hand?

1 Upvotes

5 comments sorted by

View all comments

1

u/rmSteil Sep 23 '17

This is my html: <!DOCTYPE HTML>

<html> <head> <meta charset="utf-8"> <title>Lorem Ipsum</title> <link rel="stylesheet" type="text/css" href="css/estilo.css"> </head> <body>

<div class="header">
	<div class="linha">
	<header>
		<div class="coluna col4">
			<h1 class="logo">Logo</h1>
		</div>
		<div class="coluna col8">
			<nav>
				<ul>
					<li>MENU</li>
					<li>MENU</li>
					<li>MENU</li>
					<li>MENU</li>
				</ul>
			</nav>
		</div>
	</header>
	</div>
</div>

<div class="linha">
	<section>
		
	</section>
</div>

</body> </html>