css - 我怎样才能让这个 div 向左而不是向右?

标签 css html

看看这张图片...

http://www.flickr.com/photos/91733140@N06/8329388242/in/photostream

如何让这个 div 向左而不是向右?

它一直在搞砸,我真的需要修复它,我有什么想法可以让它工作吗?

    <style type="text/css">

#body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #E0E0E0;
}

#header {
    background: #FFFFFF;
    height: 33px;
    width: 100%;
    padding: 5px 30px 5px 30px;
    font-family: arial;
    font-size: 30px;
    border-bottom: 1px #737373 solid;
    position: fixed;
    top: 0;
}

#container {
    width: 1205px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
}

#box {
    width: 228px;
    height: auto;
    background: #FFFFFF;
    border: 1px #5E5E5E solid;
    margin: 5px;
    float: left;
    font-family: arial;
}

#box_title {
    width: 218px;
    height: auto;
    padding: 5px;
    background: #5E5E5E;
    color: white;
    border-bottom: 1px #FFFFFF solid;
    float: left;
    font-family: arial;
}

#box_img {
    width: 210px;
    height: auto;
    float: left;
    margin-left: auto;
    margin-right: auto;
}

#box_options {
    width: 228px;
    height: 40px;
    background: #FFFFFF;
    color: #000000;
    border-top: 1px #5E5E5E solid;
    float: left;
    font-family: arial;

最佳答案

不是通过你打开的标签来判断你,但你似乎想要一个“Pinterestish”墙。这通过 vanilla css 并不容易,我可以建议研究一下 jquery masonry 吗?

http://masonry.desandro.com/

它为你做了所有繁重的工作

关于css - 我怎样才能让这个 div 向左而不是向右?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14099127/

相关文章:

html - 仅为 chrome 应用 css

html - 删除 Bootstrap 静态导航栏底部不需要的填充

html - 将不同的样式应用于特定的输入按钮

javascript - Bootstrap 词缀不会更改事件选项卡

html - CSS 渐变质量差

javascript - 提交按钮不更改问题

html - CSS Order Issue - 真正的逻辑是什么?

javascript - 基于浏览器jQuery触发点击

html - 当 bootstrap carousel 大小改变时,点覆盖在图像上以缩放

javascript - Bootstrap 模式不适用于示例代码