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
Noga Anaby
Courses Plus Student 4,255 Pointshas anyone succeeded the 'CSS display modes challenge on CSS layout basics 2\5'?
I tried everything, maybe theye have a problem there....? :0
9 Answers
Jonathan Grieve
Treehouse Moderator 91,254 PointsHave you got any code to show us of what you've tried so far?
Other than that, I'd suggest you could try the following display modes
display: block;
display: inline-block;
display: inline;
display: none;
display: flex;
display: table;
display: inline-flex;
Display properties are as simple as the display property in CSS and choosing one of the keyword values :)
Noga Anaby
Courses Plus Student 4,255 PointsI did in that challenge like that:
.main-nav li { display: inline-block; }
they ask for change the display of .main-nav to the display value that generates a block element thet doesn`t thake up a full line. thank you very much
john larson
16,594 PointsNoga, If you can copy and past the question thats a good thing. Also posting your code helps. There's a special way to do it three back-tics post your code three back-ticks again
<h1>Hi Noga</h1>
Jonathan Grieve
Treehouse Moderator 91,254 PointsThat's definitely the right code.
Where did you place the code you typed in?
Try adding it below any other code in the challenge and see if that helps. :)
john larson
16,594 PointsNoga, not sure if I got the right question. But this might work
.main-header {
padding: 5px;
}
.main-logo,
.main-nav,
.main-nav li {
display: inline-block;
}
Noga Anaby
Courses Plus Student 4,255 Pointsthank you both very much it worked!!
john larson
16,594 PointsGood work. Happy coding :D
Noga Anaby
Courses Plus Student 4,255 Points``` somthing { display: none; }
Noga Anaby
Courses Plus Student 4,255 Pointssomthing
john larson
16,594 Pointsvery nice. :D
john larson
16,594 PointsNoga, I just found out if you add the name of the code you are using after the back-tics as in html (space, then the code, another space) then it does the proper multicolor code highlighting
Noga Anaby
Courses Plus Student 4,255 PointsCoool....
john larson
16,594 Pointslol, I was trying to show in the code block how it works, but I kinda messed it up. I hope you get the idea.
john larson
16,594 Points<p>hello world</p>
<p>```html</p>
<p>space</p>
<p>the code you want to write</p>
<p>space</p>
<p>```</p>