关于css控制内容居中

zhourongbiao 2006-10-22 06:31:03
现有一个网页,布局为:

HeaderColumn

LeftColumn RightColumn(包含一个frame)


请问如何用css控制让它们在浏览器里居中。


...全文
234 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhourongbiao 2006-10-22
  • 打赏
  • 举报
回复
散分并谢谢大家!
myvicy 2006-10-22
  • 打赏
  • 举报
回复
好久没来转悠了,最近一段时间又喜欢来转悠了。
飘零雾雨 2006-10-22
  • 打赏
  • 举报
回复
呵呵,你们都在转悠,逮着谁都不放过^_^
大猫钓鱼 2006-10-22
  • 打赏
  • 举报
回复
谢谢,这段时间,我怎么每天看你在这转悠~~~ ^_^
myvicy 2006-10-22
  • 打赏
  • 举报
回复
楼上的楼上的几位朋友吃饭没呢,还坚持在工作岗位呀,要注意身体咯!
myvicy 2006-10-22
  • 打赏
  • 举报
回复
/* 全局CSS定义 */
body { text-align: center; font-family:宋体, serif;margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}
飘零雾雨 2006-10-22
  • 打赏
  • 举报
回复
other:
======================


<div style="width:100%;text-align:center;">
<div style="border:1px solid #630;width:90%;">
<div style="width:100%;">HeaderColumn</div>
<div style="float:left;width:50%;">LeftColumn</div>
<div style="float:right;width:50%;">RightColumn</div>
</div>
</div>
大猫钓鱼 2006-10-22
  • 打赏
  • 举报
回复
就说左右分部的部分,其实可以用一个外层来控制FLOAT层的位置

<div style="margin:0 auto">
<div style="float:left;width:120px;background-color:red"></div>
<div style="float:right;width:120px;background-color:yellow"></div>
</div>
飘零雾雨 2006-10-22
  • 打赏
  • 举报
回复
<center>
HeaderColumn

LeftColumn RightColumn(包含一个frame)
</center>

61,128

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧