Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Design Layout - Website Layout in CSS

Understand Design Layout - Website Layout in CSS with clear explanations, practical examples, and useful tips. This updated guide covers the essential...

Table of Contents

Design Layout - Website Layout in CSS is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.

Layout design or layout design is the first and very important step in the process of designing a website. There are a number of ways to design websites with CSS, but the technique is being used in a popular and highly effective way now is to combine HTML Div with CSS. Using this way, your website will run smoothly, meeting certain user requirements. So let TipsMake.com learn more about this method through the following article.

Layout - Website layout

Layout can understand how we layout the main components on a web page.

In the Layout design, tags

Commonly used to divide the main components of a website. Combined with CSS format properties, we can design Layout as desired.

A website is typically divided into sections including header, menu bar, content and footer.

Design Layout - Website Layout in CSS example image 1

There are many types of website styles, TipsMake.com will introduce more in the following sections. However, basically the structure above is most used. The article will analyze website design with the above layout.

Headers are typically located at the top of the site (or just below the top navigation menu). This section typically contains a logo or website name or some website slogans.

 .header { 
  background-color: #e9d8f4; 
  color: #58257b; 
  text-align: center; 
  padding: 20px; 
 } 

Design Layout - Website Layout in CSS example image 2

Full code:


 Thi?t k? Layout - B? c?c website trong CSS 
 





Website TipsMake.com

Navigation Bar - Navigation Bar , also known as menu bar, helps navigate main items on the website.

 /* class thanh ?i?u h??ng */ 
 .topnav { 
  overflow: hidden; 
  background-color: #333; 
 } 
 
 /* link ?i?u h??ng */ 
 .topnav a { 
  float: left; 
  display: block; 
  color: #f2f2f2; 
  text-align: center; 
  padding: 14px 16px; 
  text-decoration: none; 
 } 
 
 /* Thay ??i màu liên k?t khi di chu?t qua */ 
 .topnav a:hover { 
  background-color: #ddd; 
  color: black; 
 } 

Design Layout - Website Layout in CSS example image 3

Full code:


 Thi?t k? Layout - B? c?c website trong CSS 
 





Website TipsMake.com

  Làng Công ngh? 
  Công ngh? 
  Khoa h?c 
 


content

The layout in this section typically depends on the user object. The common layout is one or a combination of the following:

  • 1 column: typically used for mobile browsers.
  • 2 columns: often used for laptops and tablets.
  • 3 columns: often used for desktop browsers.

Design Layout - Website Layout in CSS example image 4

You can create a 3-column layout and change it to a 1-column layout on a smaller screen like this:

 /* T?o ba c?t b?ng nhau, float c?nh nhau */ 
 .column { 
  float: left; 
  width: 33.33%; 
 } 
 
 /* Clear float khác sau các c?t */ 
 .row:after { 
  content: ""; 
  display: table; 
  clear: both; 
 } 
 
 /* B? c?c linh ho?t: ba c?t x?p ch?ng lên nhau thay vì c?nh nhau khi màn hình 
 có chi?u r?ng d??i 600px */ 
 @media screen and (max-width: 600px) { 
  .column { 
  width: 100%; 
  } 
 } 

Design Layout - Website Layout in CSS example image 5

Full code:


 Thi?t k? Layout - B? c?c website trong CSS 
 





Website TipsMake.com

  Làng Công ngh? 
  Công ngh? 
  Cu?c s?ng 
 

Technology Village

Stay up to date with the latest trends, discoveries, and research on science technology.

Technology

including tips, instructions for using software, hardware, fixing errors network, fix computer errors on many operating systems such as Windows, macOS, Linux, Android, iOS.

Life

Life skills, job skills, leadership skills, life tips, things you may not know, good sayings about life, sayings famous of Jack Ma, Bill Gate, Steve Jobs.

Try changing the browser size, when the screen is less than 600px wide, the columns will overlap instead of lying side by side:

Design Layout - Website Layout in CSS example image 6

Tip: If you want to create a web layout with only 2 columns, set the width attribute to 50%, similar to 4 columns, then 25%.

Create unequal columns

Content is the largest and most important part of your website.

Most of a website, the layout of columns will not be equally divided, the content is the largest and most important part of the site, so it will occupy the most space. Secondary content (if any) is often used to switch to another link or specify information related to the main content.

By using CSS, you can change the column width as you like. Note that the sum of columns should be 100% valid.

 .column { 
  float: left; 
 } 
 
 /* C?t bên trái và ph?i */ 
 .column.side { 
  width: 25%; 
 } 
 
 /* C?t chính gi?a */ 
 .column.middle { 
  width: 50%; 
 } 
 
 /* B? c?c linh ho?t: ba c?t x?p ch?ng lên nhau thay vì c?nh nhau khi màn hình 
 có chi?u r?ng d??i 600px */ 
 @media screen and (max-width: 600px) { 
  .column.side, .column.middle { 
  width: 100%; 
  } 
 } 

Design Layout - Website Layout in CSS example image 7

Full code:


 Thi?t k? Layout - B? c?c website trong CSS 
 





Website TipsMake.com

  Làng Công ngh? 
  Công ngh? 
  Cu?c s?ng 
 

Guide

You can share your article on the page if you have an account, you You can view posted articles, view other members' posts and find Find the article you care about on the page.

Introduce

TipsMake.com is a social network about science and technology, expanding content to meet the needs of members in more technology areas such as phone, smart device, electronics, computer security.

You can become a part of TipsMake.com by posting write, experience your technology for the content management team of Social network via email info@tipsmake.com

Contact

Try changing the browser size, when the screen is less than 600px wide, the columns will overlap instead of lying side by side:

Design Layout - Website Layout in CSS example image 8

Footer is located at the bottom of the page, typically contains information such as copyright, contact information.

 .footer { 
  background-color: #e9d8f4; 
  color: #58257b; 
  padding: 5px; 
  text-align: center; 
 } 

Design Layout - Website Layout in CSS example image 9

Full code:


 Thi?t k? Layout - B? c?c website trong CSS 
 





Website TipsMake.com

  Làng Công ngh? 
  Công ngh? 
  Cu?c s?ng 
 

Guide

You can share your posts on the page if you have an account.

Introduce

TipsMake.com is a social network about science and technology, expanding content to meet the needs of members in more technology areas such as phone, smart device, electronics, computer security.

Contact

Phone: 024 2242 6188.

Email: info@tipsmake.com.

License No. 362 / GP-BTTTT. Ministry of Information and Communications issued on June 30, 2016.

Sample layout

Design Layout - Website Layout in CSS example image 10

Website TipsMake.com

Knowledge - Experience - FAQ

  Làng Công ngh? 
  Công ngh? 
  Cu?c s?ng 
  ??ng ký 
 

Form - Form in CSS

Quách T?nh, February 14, 2019
Image

Forms are an integral part of any kind of website.

This guide, TipsMake.com will show you how to build the section display interface of a basic form. This interface can be done Pretty nice with CSS

Attribute Selector in CSS

Quách T?nh, 12/02/2019
Image

Attribute selector is the way to select the elements you want to type in HTML documents are based on the attributes of one or more HTML tags.

Attribute selector can select objects without having to declare adding Classes or IDs into HTML tags and still be able to navigate get to those components, make the code more neat and coherent.

Introduce

Image

TipsMake.com is a social network about science and technology.

Highlights

Image

Image

Image

Follow Me

Facebook

YouTube

License No. 362 / GP-BTTTT. Ministry of Information and Communications issued on June 30, 2016.

Previous post: Counter - CSS counter

Next lesson: Unit - Unit of measurement in CSS

FAQ

What should you know about layout - Website layout?

Layout can understand how we layout the main components on a web page.

What should you know about header?

Headers are typically located at the top of the site (or just below the top navigation menu). This section typically contains a logo or website name or some website slogans.

What should you know about website TipsMake.com Navigation bar?

Navigation Bar - Navigation Bar, also known as menu bar, helps navigate main items on the website.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.