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
Andres Chaves
3,462 PointsCSS3 Display Menu and Products Divs Side to Side
Hi Community,
I am trying to display a menu side to side my product catalog for that I have something like follows:
<section> <nav> <h1>Baby Boy</h1> <ul> <li><a>All</a></li> </ul> <h1>Baby Girl</h1> <ul> <li><a>All</a></li> </ul> </nav> </section> <section> <h1>Product Catalog</h1> <ul> <li><img></li> <li><img></li> <li><img></li> </ul> </section>
So I need my two sections inside my body to stay side to side, may be the menu 30% of the screen and the catalog 70%.
What I try ? I try to put the sections inside a div and give the div a display inline-block and it work, but when I try to give some width to the pictures the inline-block stop working.
1 Answer
Steven Parker
243,228 PointsYou forgot to show the CSS and there's no actual images so it's hard to see your situation.
However, it sounds like CSS grid might be a good solution for you There happens to be a course for it here: CSS Grid Layout, along with several practice workshops.
Andres Chaves
3,462 PointsAndres Chaves
3,462 PointsThanks, I am going to review the course