我正在为使用Bootstrap CSS的我的学院开发一个项目,并且我一直在修复一些对齐问题。我想要实现的是将徽标左对齐(获得宽度的35%),并将社交插件和注册&登录按钮向右对齐(获取剩余空间,即65%)。在css中修复对齐
我现在面临的问题是一切都是垂直对齐!我已经编码到目前为止在下面提到。如果有人修复我的代码中的错误,而不是提出新的错误,将不胜感激。
下面是HTML:
<div class="container">
<div id="topBar">
<div class="topLeft">Logo</div>
<div class="topRight">
<div class="socialPlugin">f t g</div>
<div class="signUpIn">Sign Up/In</div>
</div>
</div>
</div>
这里是CSS:
#topBar {
width: 100%;
}
#topBar .topLeft {
width: 35%;
}
#topBar .topRight {
width: 65%;
}
#topBar .topRight .socialPlugin {
float: left;
}
#topBar. topRighht .signUpIn {
float: right;
}
谢谢
,你为什么和引导困扰,如果你不打算使用的电网和其他布局组件提供? – isherwood
你真的要求某人为你完成Bootstrap集成到你的代码中吗?您是否阅读过Bootstrap的正确类文档? - http://getbootstrap.com/css/#grid-intro – Lee
我使用引导程序,因为我希望所有事情都能做出响应@isherwood –