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 trialtian jin
Courses Plus Student 5,162 Pointswhy 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;
}
3 Answers
Pavlo Kochubei
15,009 PointsThe 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!
Leigh Maher
21,830 PointsIt 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?
Matteo Simeone
13,587 PointsI think this happens because the main-nav list items have an inline-block instead of table-cell value for the display attribute.
tian jin
Courses Plus Student 5,162 Pointstian jin
Courses Plus Student 5,162 Pointsit happens around 3:24 in the video