Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Mariano Giustozzi
3,351 PointsCSS BACKGROUND COLOUR WONT CHANGE
When I run the code the background colour doesnt change although the Nav does-
<!DOCTYPE html>
<html>
<head>
<title>TRANOHF SRL</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1 class="text-center">Transporte de Cargas Liquidas</h1>
<div class="container">
<div id="nav1" class="navbar">
<ul class="nav navbar-nav">
<li>
<a href="index.html"><i class="fa fa-home"></i> Inicio</a>
</li>
<li class="active">
<a href="galeria.html"><i class="fa fa-photo"></i> Galeria</a>
</li>
<li>
<a href="contacto.html"><i class="fa fa-envelope"></i> Contacto</a>
</li>
<li>
<a href="nosotros.html"><i class="fa fa-users"></i> Nosotros</a>
</li>
</ul>
</div>
CSS:
body {
background-color: Red;
}
#nav1{
margin-left: 340px;
font-size: 20px;
}
3 Answers
maximleguennec
Full Stack JavaScript Techdegree Student 4,777 Points<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="css/style.css">
your personal stylesheet must be at the bottom, after bootstrap.min.css
jag
18,266 PointsThat style just result in the background having a red background. Is there another style declared within the css that changes the color of the background?
I also noticed you didn't close the body tag </body>.
Mariano Giustozzi
3,351 Pointswhere's not closed the body tag?
jag
18,266 Points<head>
<title>TRANOHF SRL</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1 class="text-center">Transporte de Cargas Liquidas</h1>
<div class="container">
<div id="nav1" class="navbar">
<ul class="nav navbar-nav">
<li>
<a href="index.html"><i class="fa fa-home"></i> Inicio</a>
</li>
<li class="active">
<a href="galeria.html"><i class="fa fa-photo"></i> Galeria</a>
</li>
<li>
<a href="contacto.html"><i class="fa fa-envelope"></i> Contacto</a>
</li>
<li>
<a href="nosotros.html"><i class="fa fa-users"></i> Nosotros</a>
</li>
</ul>
</div>
<!-- Here -->
maximleguennec
Full Stack JavaScript Techdegree Student 4,777 Pointsand if you can't find solution type background-color: red !important;