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 trialMichael Stone
3,087 Points#primary wont work. My secondary works and I'm 100% certain the code is correct. I checked 100 times. HELP!
@media screen and (min-width:480px){
/+*************************************
Two Column Layout
***************************************/
#primary {
width: 50%;
float: left;
background-color: navy;
}
#secondary {
width: 40%;
float: right;
}
}
My primary is taking up 75% of the screen. My html is:
<section id="primary">
<h3>General Information</h3>
<p>We are currently looking for promoters. If you are interested
please dont hesitate to call us.</p>
<p>please only use phone contact for urgent inquiries, otherwise
facebook and email are the best way to reach me</p>
</section>
<section id="secondary">
<h3>Contact Details</h3>
<ul class="contact-info">
<li class="phone"> <a href="tel:555-4527">555-4527</a></li>
<li class="mail"><a href="mailto:camden@emaple.com">camden@example.com</a></li>
<li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=camden_tech">@camden_tech</a></li>
</ul>
</section>
PLEASE HELP. I cant figure out what is wrong with my code.
2 Answers
Rich Donnellan
Treehouse Moderator 27,696 PointsMichael,
Code looks good other than missing the opening section
with id
of primary
.
<section id="primary">
<h3>General Information</h3>
<p>We are currently looking for promoters. If you are interested please dont hesitate to call us.</p>
<p>please only use phone contact for urgent inquiries, otherwise facebook and email are the best way to reach me</p>
</section>
...
Hope this helps!
-Rich
Jason Anello
Courses Plus Student 94,610 PointsHi Michael,
You have an error with your css comment:
/+*************************************
Two Column Layout
***************************************/
You have a plus sign where an asterisk is needed. This would cause a parse error and your entire #primary
rule would be ignored by the browser. Only the #secondary
styles would be applied.
Try fixing that and give us an update if there's still a problem.
Michael Stone
3,087 PointsThank you so much! That was my only issue now everything looks normal like it should.
Wayne Priestley
19,579 PointsWayne Priestley
19,579 PointsHi Michael,
I've edited your code so it appears correct in your post.
Here is a link to explain how to use Markdown to post your code How to post code
If you look at the bottom of the box when your typing a reply you will see Markdown Cheatsheet that will also explain how to post your code.
You have to make sure you have a bit of space under your last line of text in your post. Then you add three back ticks followed by html or css depending on the type of code your inserting.
Then straight after your last line of code you add another three back ticks.
Remember to leave at least a few lines between any text at the top or bottom of your code.
Hope this helps.