search
HomeWeb Front-endCSS TutorialHow to lay out div+css web pages? div+css web page layout method

The content of this article is about how to lay out div css web pages? The div css web page layout method has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

div css layout is the latest web page layout concept, which is completely different from the old layout methods (such as table layout). First, use div tags to divide the content areas on the entire page, then use css for positioning, and finally add content to the corresponding areas. The layout of div css is very simple and relatively easy to operate. The following is an introduction to the css div layout method.

1. Use div to divide the page.

Use div to divide the page. This is the first step to layout the website page. The next step can only be taken after the overall framework of the web page is determined. It mainly uses divs to divide each content area. Taking the simplest page frame as an example, the page generally consists of several parts: banner, main content, menu main navigation, and the bottom of the page (footer is also called footnote). Each part consists of its own id to identify. As shown in the figure:

How to lay out div+css web pages? div+css web page layout method

2. Design the position of each content block

After the page content is determined, you need to according to the content itself Consider the layout of the night shift, such as menu, double columns, left and right columns. Generally, small websites use two columns. Large websites and some portal websites mostly use three columns, left, middle and right. It is generally recommended to use two columns. After the content block is determined, you can use css to position it directly.

How to lay out div+css web pages? div+css web page layout method

3. Use css to position

After determining the page frame, you can position the content blocks of each design with css, and then Make an overall plan for each block and add content at the end.

The typesetting is relatively simple, using two float positioning, five center alignments, and one clear float. Pictures are generally placed in the banner area, and links are placed in the navigation area. You can place a tags directly or ul tags, or h2 tags with a tags. The main content of the website is generally placed with links (ul or ol tags with a tags), pictures, and content summaries (p Tags apply a tag).

The above is how to layout the div css web page? A complete introduction to the div css web page layout method. If you want to know more about CSS3 tutorial, please pay attention to the PHP Chinese website.

The above is the detailed content of How to lay out div+css web pages? div+css web page layout method. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:divcss5. If there is any infringement, please contact admin@php.cn delete
Weekly Platform News: Web Apps in Galaxy Store, Tappable Stories, CSS SubgridWeekly Platform News: Web Apps in Galaxy Store, Tappable Stories, CSS SubgridApr 14, 2025 am 11:20 AM

In this week's roundup: Firefox gains locksmith-like powers, Samsung's Galaxy Store starts supporting Progressive Web Apps, CSS Subgrid is shipping in Firefox

Weekly Platform News: Internet Explorer Mode, Speed Report in Search Console, Restricting Notification PromptsWeekly Platform News: Internet Explorer Mode, Speed Report in Search Console, Restricting Notification PromptsApr 14, 2025 am 11:15 AM

In this week's roundup: Internet Explorer finds its way into Edge, Google Search Console touts a new speed report, and Firefox gives Facebook's notification

The Power (and Fun) of Scope with CSS Custom PropertiesThe Power (and Fun) of Scope with CSS Custom PropertiesApr 14, 2025 am 11:11 AM

You’re probably already at least a little familiar with CSS variables. If not, here’s a two-second overview: they are really called custom properties, you set

We Are ProgrammersWe Are ProgrammersApr 14, 2025 am 11:04 AM

Building websites is programming. Writing HTML and CSS is programming. I am a programmer, and if you're here, reading CSS-Tricks, chances are you're a

How Do You Remove Unused CSS From a Site?How Do You Remove Unused CSS From a Site?Apr 14, 2025 am 10:59 AM

Here's what I'd like you to know upfront: this is a hard problem. If you've landed here because you're hoping to be pointed at a tool you can run that tells

An Introduction to the Picture-in-Picture Web APIAn Introduction to the Picture-in-Picture Web APIApr 14, 2025 am 10:57 AM

Picture-in-Picture made its first appearance on the web in the Safari browser with the release of macOS Sierra in 2016. It made it possible for a user to pop

Ways to Organize and Prepare Images for a Blur-Up Effect Using GatsbyWays to Organize and Prepare Images for a Blur-Up Effect Using GatsbyApr 14, 2025 am 10:56 AM

Gatsby does a great job processing and handling images. For example, it helps you save time with image optimization because you don’t have to manually

Oh Hey, Padding Percentage is Based on the Parent Element's WidthOh Hey, Padding Percentage is Based on the Parent Element's WidthApr 14, 2025 am 10:55 AM

I learned something about percentage-based (%) padding today that I had totally wrong in my head! I always thought that percentage padding was based on the

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft