左边界html,我无法居中的div上的奇数左边距

for the life of me cant figure out why this div wont centre in its container.

I have a fixed top bar which has a width of 100%, and then a inner div which has a width of 750px and a margin of auto. This div however will not sit centre, but instead sit about 200px right of centre.

I already have another div centered in another 100% width container and that works fine, but this wont.

I have gone through firebug inspector and played with everything i can, and i cant seem to find why it wont sit right.

Easiest way of showing you is...

The url is:

The div i am trying to centre is the yellow one in the very top bar. It holds the page navigation (next, prev etc).

The BETA code is simply: test

Any ideas would be appreciated :) Thanks, Craig.

The HTML

The CSS

#sidebar {

width:250px;

background-color:#fff;

height: 100%;

float:left;

position:fixed;

border-right: 0px solid #333;

z-index: 996;

-webkit-box-shadow: 2px 0px 5px -2px #888;

-moz-box-shadow: 2px 0px 5px -2px #888;

box-shadow: 2px 0px 5px -2px #888;

}

#topbar {

height: 35px;

width: 100%;

background-color:#444;

position:fixed;

z-index: 950;

border-bottom: 1px solid #222;

border-top: 1px solid #222;

}

.pagecontrol1 {

width: 750px;

height: 100%;

margin: auto;

background-color: #ff0;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值