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 trialDaniel Politz
6,338 PointsWhen making the graph everything shoes up but the colors. Can you tell why?
<!DOCTYPE html>
<html lang="en">
<head>
<title>Accessibility</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="wrapper">
<h1>Fruit Farms in Florida</h1>
<ul class="graph">
<li>
<span class="fruit" style="width: 40%">Oranges</span>
<span class="total">120 Farms</span>
</li>
<li>
<span class="fruit" style="width: 27%">Strawberries</span>
<span class="total">80 Farms</span>
</li>
<li>
<span class="fruit" style="width: 20%">Apples</span>
<span class="total">60 farms</span>
</li>
<li>
<span class="fruit" style="width: 13%">Banana</span>
<span class="total">40 farms</span>
</li>
</ul>
</div>
</body>
</html>
#wrapper {
font-family: sans-serif;
width: 80%;
margin: 0 auto;
}
.graph {
padding: 0;
width: 50%;
float: left;
border-bottom: 1px solid #888;
}
.graph li {
position: relative;
list-style: none;
border-top: 1 px solid #888;
clear: both;
}
.fruit {
display: block;
padding: 1em;
position: relative;
color: #22;
background: #66EE99
font-weight: bold;
float: left;
}
2 Answers
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsHi, '#22' is not a valid color, there is an unnecessary space between '1px' and you are missing a closing semicolon
Should look something like:
#wrapper {
font-family: sans-serif;
width: 80%;
margin: 0 auto;
}
.graph {
padding: 0;
width: 50%;
float: left;
border-bottom: 1px solid #888;
}
.graph li {
position: relative;
list-style: none;
border-top: 1px solid #888; //removed space between 1px
clear: both;
}
.fruit {
display: block;
padding: 1em;
position: relative;
color: #222; // changed to #222
background: #66EE99; // added closing ;
font-weight: bold;
float: left;
}
Hope this helps! :)
Daniel Politz
6,338 PointsThanks so much!