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

CSS CSS Foundations Values and Units Absolute Length Units

Download code problem

Starting with this lesson I cannot get the project file code to display correctly and I can't see anything that looks wrong. This lesson had the .html and a page-style.css which I have copied below. If anyone has any suggestions on how to correct this I really appreciate. Thanks so much and have a great day.

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Absolute Length Units</title> <link rel="stylesheet" href="page-styles.css"> <link rel="stylesheet" href="absolute-length-units.css"> </head> <body> <h1>Absolute Length Units</h1> <div class="cm"> Centimeters </div> <div class="mm"> Millimeters </div> <div class="in"> Inches </div> <div class="pc"> Picas </div> <div class="pt"> Points </div> <div class="px"> Pixels </div>
</body> </html>

/* Page Styles --------------------------------------------- */

body { margin: 0 auto; padding: 2em 0; width: 800px; background: #000; color: #FFF; font-family: sans-serif; line-height: 1.5; }

h1 { position: relative; margin-bottom: 40px; padding-bottom: 25px; border-bottom: 2px dotted #a3a3a3; }

div { -webkit-box-sizing: border-box; margin: 15px 0; padding: 15px; width: 150px; color: #000; text-shadow: 0 1px 1px rgba(255,255,255,.6); font-weight: bold; font-size: 18px; }

.px { background-color: #d93d37; }

.cm { background-color: #e2e2e2; }

.mm { background-color: #467f77; }

.in { background-color: #45c3ae; }

.pc { background-color: #fff6ad; }

.pt { background-color: #e0cd95; }

1 Answer

alex mattingley
alex mattingley
7,508 Points

It might help if you either post the code correctly here (its tricky but look at the markdown cheatsheet) or if you post a link to a codpen.