Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Web Design

You're reading from   Practical Web Design Learn the fundamentals of web design with HTML5, CSS3, Bootstrap, jQuery, and Vue.js

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788395038
Length 368 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Philippe Hong Philippe Hong
Author Profile Icon Philippe Hong
Philippe Hong
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
PacktPub.com
Contributers
Preface
1. Evolution of Web Design FREE CHAPTER 2. Web Design and its Components 3. Website-Designing Workflow 4. Responsive Versus Adaptive Design 5. Learning HTML5 6. Learning CSS3 7. Building Your Own Website 8. Making Our Website Responsive 9. Adding Interaction and Dynamic Content 10. Optimizing and Launching Our Website 11. What is Bootstrap? 12. Building a Website with Bootstrap 13. Introduction to Client-Side Rendering 14. Tools to Help Your Workflow 1. Other Books You May Enjoy Index

CSS layout and dividers


Now that we understand how the box model works, we can try to build a simple layout for our HTML page, as shown in the following diagram:

Our layout will have a container with a sidebar on the right, and at the bottom a footer. A very basic layout for a lot of websites.

 This layout will be inside a container that will be centered on the page. Without further ado, let's get started!

The basic layout

To create our basic layout, we will use the <div> element. The <div> element is the most commonly used HTML element. <div> stands for divide, and we simply use it to divide our page into sections by creating boxes where we put our contents.

 Let's clear our CSS in your <style> section and start from scratch.

 We'll start first by adding a <div> element to wrap all the content we've created, and then add a class container to it:

   <div class="container">
     <h1 id="my-name">John Doe</h1>
     <p class="text">I'm an <b...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime