<html>
<head>
<title>CSS 將內容置中方法</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">


<STYLE>

#movecenter {
  position: relative;
  left: 50%;
  margin-left: -380px; /* 760 除以 -2 */
  width: 760px;
}
</STYLE>

</head>
<body>

<div id="movecenter">
需要至中的內容
</div>

</body>
</html>
arrow
arrow
    全站熱搜

    lovean 發表在 痞客邦 留言(0) 人氣()