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

has 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
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

Have 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 :)

I 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

Noga, 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
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

That'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. :)

Noga, 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;
}

thank you both very much it worked!!

Good work. Happy coding :D

``` somthing { display: none; }

somthing

very nice. :D

Noga, 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

Coool....

lol, I was trying to show in the code block how it works, but I kinda messed it up. I hope you get the idea.

<p>hello world</p>
<p>```html</p>
<p>space</p>
<p>the code you want to write</p>
<p>space</p>
<p>```</p>