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 trialJesse Lawson
11,159 Pointsh1 element not visible in workspace preview
I launched a new workspace and made some adjustments along with Mr. Hernandez and saw in the preview that the h1 element is not visible.
The color is set to white in the CSS and the text is there in the index.html file.
<h1>Lake Tahoe, California</h1>
h1 {
font-size: 90px;
color: white;
}
7 Answers
Jesse Lawson
11,159 PointsInteresting...
I left the program for a few days and have come back to find the problem solved. I made no changes to the code at all. hmmm
Chris Shaw
26,676 PointsHi Jesse,
By default browsers have a background colour of white thus you won't see your text if it's the same colour, try changing it to red for instance and you should see it appear.
h1 {
font-size: 90px;
color: red;
}
Jesse Lawson
11,159 PointsThanks,
I tested it in several colors. The header is set to background-color: orange; and the h1 element is in the header. So the white text should show up on the orange background.
h1 { font-size: 5.625em; color: white; }
.main-header { background-color: orange; }
So it isn't visible in any text color. It just isn't there. I checked the html for problems and couuldn't find any. This has only happened on the latest workspace for this course.
Jesse Lawson
11,159 Points<body>
<header id="top" class="main-header">
<span class="title">Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
.main-header {
background-color: orange;
}
h1 {
font-size: 5.625em; /* 90px / 16px */
color: red;
}
Jesse Lawson
11,159 PointsThe h1 element does not show up on the workspace preview.
ezekielenejeta
2,665 PointsIn the HTML file, give the h1 element the class main-heading.
Am stuck here, somebody help out with challenge 3
Simon Fairley
6,553 PointsYou need to assign the h1 element with the class "main-heading"
<h1 class="main-heading">
Ary de Oliveira
28,298 Points<!DOCTYPE html> <html> <head> <title>Lake Tahoe</title> <link rel="stylesheet" href="page.css"> <link rel="stylesheet" href="style.css"> </head> <body> <header> <header id="top" class="main-header"> <span>Journey through the Sierra Nevada Mountains</span> <h1 class="main-heading">Lake Tahoe, California</h1> </header> <p> Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation. </p> <a href="#">Find out more</a> <div> <h2>Check out all the Wildlife</h2> <p> As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles. </p> <a href="#">See the Wildlife</a> </div> </body> </html>
Ary de Oliveira
28,298 Points<!DOCTYPE html> <html> <head> <title>Lake Tahoe</title> <link rel="stylesheet" href="page.css"> <link rel="stylesheet" href="style.css"> </head> <body> <header> <header id="top" class="main-header"> <span>Journey through the Sierra Nevada Mountains</span> <h1 class="main-heading">Lake Tahoe, California</h1> </header> <p> Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation. </p> <a href="#">Find out more</a> <div> <h2>Check out all the Wildlife</h2> <p> As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles. </p> <a href="#">See the Wildlife</a> </div> </body> </html>