Web Standard Web page layout: Implement to center multiple Div

Source: Internet
Author: User
Tags implement min version xmlns
Web|web Standard | Web page

<?xml version= "1.0" encoding= "iso-8859-1"? ><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "><ptml xmlns=" http://www.w3.org/1999/xhtml "><pead><title>untitled document</title> <meta http-equiv= "Content-type" content= "text/html; Charset=iso-8859-1 "/><style type=" Text/css ">body {text-align:center} #outer {width:60%; background: #ffffcc ; Margin:auto; Text-align:center}. inner {width:100px; height:100px; margin:5px; border:1px solid #000;} * HTML. Inner {display:inline}/* for ie*/html>body #outer {display:table}/*for Mozilla */html>body. Inner {display: table;float:left}/*for Mozilla */@media All and (min-width:0px) {/* Opera 7 styles */html>body. Inner {display:inline-b Lock;float:none}} </style></head><body><!--Force quirks mode by using the XML pro-logue--><div id= "outer" > <div class= "inner" >test</div> <div class= "Inner ">2</div> <div class=" inner ">3</div> <div class=" inner ">4</div> <div class= "Inner" >5</div> <div class= "inner" >6</div> <div class= "inner" >7</div> <div class = "inner" >8</div> <div class= "inner" >9</div> <div class= "inner" >10</div> <div class= "inner" >11</div> <div class= "inner" >12</div> <div class= "inner" >13</div> <BR style= "Clear:both"/></div></body></html>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]





untitled document






test

2

3

4

5

6

7

8

9

10

11

12

13

<BR style= "Clear:both"/>




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.