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
Michaela Babic
7,720 PointsCan't get CSS to apply...
This was working, and then all of a sudden it wasn't. I know it must be a typo or something, but I can't seem to find it.
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Profile</title> <link href="https://fonts.googleapis.com/css?family=Acme" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="main.css"> </head> <body>
<div class="container-fluid">
<h1>Michaela Babic</h1>
<h2>Web Designer/Developer</h2>
</div>
</body> </html>
(css page)
h1 {
padding: 10px 10px 10px 10px;
}
.container-fluid { background-color: #42f1f4; color: white; padding: 10px 10px 10px 10px; text-shadow: 2px 2px 2px gray; font-family: 'Acme', sans-serif; }
1 Answer
Steven Parker
243,656 PointsI don't see any obvious typo's, thought it's a bit hard to read unformatted code.
My first concern would be the CSS loading:
<link rel="stylesheet" type="text/css" href="main.css">
This says it will get a CSS file named "main.css" from the same folder as the HTML file. Did you perhaps move the file into a "css" sub-folder? Or change the name of it?
Also, when sharing code with the community, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area.
Or watch this video on code formatting.