Chapter 3: Easy Design

Beautiful CSS always starts with great HTML markup... still! In this chapter, we'll mark up the content with HTML as best we can, based on the mobile design. Next, we'll apply existing CSS from the style guide. We'll add CSS to make this look like our screenshots. And finally, of course, we'll make it all responsive.

Easy design, desktop dimension Easy design, tablet dimension
Easy design, desktop and tablet dimensions
Easy design, mobile dimension
Easy design, mobile dimension

3A: Marking up the HTML

Our HTML order will include the header, opening image, tour list, images and reviews, and the footer.

Useful CodePen image links:

https://assets.codepen.io/296057/fem-maglime-logo.svg
  
https://assets.codepen.io/296057/fem-purple-arms.jpg

https://assets.codepen.io/296057/fem-fireworks.jpg
            
https://assets.codepen.io/296057/fem-blue-arms.jpg
            
https://assets.codepen.io/296057/fem-blindfold-475.jpg

3B: Header, banner, tour styling

Because our CSS gets long, I'm going to use @layer to group our CSS in our document. @layer is supposed to be used for controlling the cascade (see my Intermediate HTML and CSS course). However, here we'll use it to easily collapse a bunch of styles in our CSS so we can navigate our stylesheet more easily. You do NOT need to use @layer this way in your production code!!! This is a teaching trick only.

When finished with this step, your page should look something like this (click for larger format):

finished state

3C: Reviews and images

To get the review under control, we need to do the following:

When finished with this step, your page should look something like this (click for larger format):

finished state

3D: Tablet Design

Approach: Override styling for a tablet design in a media query, leveraging existing styles and making changes where needed.

Tips:

We will style the wrapper, banner image, tour section, reviews and images, and finally the header and footer.

When finished with this step, your page should look something like this (click for larger format):

finished state

3E: Desktop layout

Override styling for a desktop design in a media query, leveraging existing styles and making changes where needed. We'll start with the wrapper and move on to the tour dates.

Tips

When finished with this step, your page should look something like this (click for larger format):

finished state