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 CSS Layout Techniques Display Modes Table Display

why when we set the .main-logo display as table cell, the height of the logo changed?

.main-nav,
.main-nav li {
    display: inline-block;
}
.main-logo,
.main-nav {
    display: table-cell;```
    vertical-align: middle;
}

it happens around 3:24 in the video

3 Answers

The same question here. After we have set the display value to table-cell, the .main-logo size seems to adjust with the size of the browser ( if we don't set a particular height for the .main-logo).

Why doesn't it happen to .main-nav elements?

Guil Hernandez, thank you!

It seems to me that it's height is adjusting to the min-height: 200px; but if this is the case, why doesn't the same happen with the main-nav list item containers?

I think this happens because the main-nav list items have an inline-block instead of table-cell value for the display attribute.