Challenge 2: Backgrounds & Overflow

This challenge includes a layout seen on news sites. We have the top 5 headlines of the day, arranged in different ways and with different elements at different breakpoints. For mobile, we scroll horizontally to see the options. Larger screen sizes may get fewer images and a different layout.

Don’t worry about performance for this project. You may hide and show images and content as needed to achieve this layout.

Less than 800px
Mobile version Mobile version
Min-width: 800px
Tablet version
Min-width: 1000px
Desktop version

Questions to consider

Next Level Ideas

While these challenges require only HTML and CSS, if you want to take them next level by including more programming language(s), here's an idea.

Hints/Spoilers

You may want to look into minmax() for dealing with cell widths.

The scrollbar is just a browser scrollbar. How did we style it? https://ishadeed.com/article/custom-scrollbars-css/.

Beginning CodePen

Additional CodePen Links