Examples of div+css typesetting _css/html

Source: Internet
Author: User

Examples of div+css typesetting

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.D TD ";> <ptml xmlns=" http://www.w3.org/1999/xhtml "; lang= "gb2312" > <pead> <meta http-equiv= "Content-type" content=; charset=gb2312 "/> <meta http-equiv=" content-language "content=" gb2312 "/> <meta content=" All "Name=" R Obots "/> <meta name=" Author "content=" huobazi@aspxboy.com, Live targets "/> <meta" Copyright "Name=" W Ww. aspxboy.com, free copyright, arbitrary reprint. " /> <meta name= "Description" content= "www. Aspxboy.com "/> <meta name=" Keywords "content=" www. Aspxboy.com, live target, Huobazi "/> <title> div layout </title> <style> body{text-align:center;margin:0;padd ing:0}/*text-align:center is an IE must have the * * div {height:200px; color:red; }. title {margin:0 Auto; width:776px; Background-color:#abcdef; }. middle {margin:0 auto; width:776px; }. Left {float:left; Clear:right; width:20%; Background-color: #eeefff; } Center {float:left; Clear:right; width:50%; Background-color: #CCC000; }. Right {float:left; Clear:right; width:30%; Background-color: #fff000; }. both {clear:both; width:100%; Background-color: #666999; }. footer {margin:0 auto; width:776px; Clear:both; Background-color: #000fff; } </style> </pead> <body> <div class= "title" > Top </div> <div class= "Middle" > <div class= "Left" > Left-Hand </div> <div class= "center" > Central </div> <div class= "right" > Right-hand side </div> <div class= "Both" > Full line </div> <div class= "left" > Left-Hand </div> <div class= "center" > Central </div> <div class= "right" > Right-hand side </div> <div class= "Both" > Full line </div> <div class= "left" > Left-Hand </div> <div class= "center" > Side </div> <div class= "right" > right-hand </div> </div> <div class= "Footer" > Bottom </div> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.