开发者

Twitter Bootstrap top bar and container resize padding

http://twitter.github.com/bootstrap/

If you look here and resize the width of your browser you will see that there is no padding on the left. If you add padding though it throws off the layout center.

Is there something I could do to fix this or does the entire layout need to be changed? I see how开发者_StackOverflow twitter.com does it using width and stuff but that requires more div elements. Thanks for the help.


Assuming you want to push everything in say 10px. The following worked fine for me.

body>div { padding: 0 10px }

This will apply a padding of 10px to the left and right of the child divs of the body.

You will also probably want to change the width on the .container style to something that's more sensible. The standard is 940px so if you're new padding is 10px you may want to make it 920px.

In addition, you'll want to move the background styling from the .topbar-inner style to the .topbar style. If you don't do this, you're top bar will not have a background where the padding was applied.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜