html 两列文字居中显示,html – 如何使用CSS将两列居中?

我试图在我的网站上设置两列,但存在一些问题.每次更改的结果都是左侧位置(见

picture).我究竟做错了什么?这是我的CSS:

body {

background - image: url("../img/gray.png");

}

#header {

position: absolute;

top: 0;

left: 0;

right: 0;

height: 100px;

background: #cc0000;

text - align: center;

}

#wrapper {

margin: 100px;

width: 1280px;

}

#leftcolumn {

float: left;

background - image: url("../img/gray.png");

margin: 10px 0px 10px 0px;

padding: 10px;

height: 682px;

width: 460px;

}

#rightcolumn {

float: left;

color: #333;

border: 1px solid # ccc;

background: #F2F2E6;

margin: 10px 0px 10px 0px;

padding: 10px;

height: 500px;

width: 439px;

display: inline;

position: relative;

}

谢谢

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值