Book Image

Practical Web Design

By : Philippe Hong
Book Image

Practical Web Design

By: Philippe Hong

Overview of this book

Web design is the process of creating websites. It encompasses several different aspects, including webpage layout, content production, and graphic design. This book offers you everything you need to know to build your websites. The book starts off by explaining the importance of web design and the basic design components used in website development. It'll show you insider tips to work quickly and efficiently with web technologies such as HTML5, CSS3, and JavaScript, concluding with a project on creating a static site with good layout. Once you've got that locked down, we'll get our hands dirty by diving straight into learning JavaScript and JQuery, ending with a project on creating dynamic content for your website. After getting our basic website up and running with the dynamic functionalities you'll move on to building your own responsive websites using more advanced techniques such as Bootstrap. Later you will learn smart ways to add dynamic content, and modern UI techniques such as Adaptive UI and Material Design. This will help you understand important concepts such as server-side rendering and UI components. Finally we take a look at various developer tools to ease your web development process.
Table of Contents (20 chapters)
Title Page
PacktPub.com
Contributers
Preface
Index

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 thecontainer, 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. 

Let's now fix our the title. This will be straightforward; we will just need to find our .hero-title class and add some media queries:

/* Large Mobile Styles */
@media only screen and (max-width: 768px) {
  .hero-text .hero-title {
    font-size: 90px;
  }
}

That's it! You can always change the value as you wish, as well.