Skip to Content
Practical Web Design
book

Practical Web Design

by Philippe Hong
April 2018
Beginner content levelBeginner
368 pages
7h 37m
English
Packt Publishing
Content preview from Practical Web Design

Making the hero section responsive

Let's check how responsive our hero is at the moment:

iPad view and iPhone 8 view

As we see, there is nothing to change in the iPad view; however, for the iPhone view, it lacks padding and the title seems a bit too big. 

The way I can see to fix this without too much code is to add some padding to the container, the container we have implemented in every section:

.container {  max-width: 940px;  margin: 0 auto;}/* Tablet Styles */@media only screen and (max-width: 1024px) {  .container {    padding: 0px 15px;  }}

We will add some padding from the tablet breakpoint, so it will affect all lower breakpoints too. 

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Design Playground

Web Design Playground

Paul McFedries
Hello Web Design

Hello Web Design

Tracy Osborn
The Principles of Beautiful Web Design, 4th Edition

The Principles of Beautiful Web Design, 4th Edition

Jason Beaird, Alex Walker, James George

Publisher Resources

ISBN: 9781788395038Supplemental Content