<center> ... </center> 的方法也可以,不過好像是不合法的。

今天花了幾分鐘研究了一下 FlickrClient 的樣式表,終於讓我學會用 CSS 來把 <div> ... </div> 擺到畫面中間的方法了。

div#page {
  margin-left: auto;
  margin-right: auto;
  width: 795px;
  max-width: 795px;
}

然後用 <div id="page"> ... </div> 把整個 <body> 裡面的東西包起來就好了。

哈哈,真快樂。

Posted by yungyuc at 19:37, 0 comment, 0 trackback.
Navigate
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "avfOc"
© hover year to navigate month: powered by django