三分之一,三分之二的列不会彼此对齐

时间:2014-03-13 06:16:19

标签: html css skeleton-css-boilerplate

我一直在使用骨架框架,这是我的代码:

<html>
<head>
    <title></title>
    <link rel="stylesheet" href="stylesheets_skeleton/skeleton.css">
</head>
<body class = "container sixteen columns" style = "height : 400px; border: solid 1px;">
    <div class = "two-thirds column" style = "height: 200px; border: solid 1px; float: left;">

    </div>
    <div class = "one-third column" style = "height: 200px; border: solid 1px; float: right;">

    </div>

</body>

我得到这个输出:

enter image description here

虽然我的预期输出是这样的:

enter image description here

请帮助,谢谢:)

2 个答案:

答案 0 :(得分:0)

这可以帮助您

 <html>
    <head>
        <title></title>
        <link rel="stylesheet" href="stylesheets_skeleton/skeleton.css">
    </head>
    <body class = "container sixteen columns" style = "height : 400px; border: solid 1px;">
    <div style="width:100%; float:left;">
        <div class = "two-thirds column" style = "height: 200px; border: solid 1px; float: left;">

        </div>
        <div class = "one-third column" style = "height: 200px; border: solid 1px; float: right;">

        </div>
    </div>
    </body>
</html>

答案 1 :(得分:0)

在'列'display:-webkit-box中添加样式,并从'columns'/ '16'类的子项中删除float样式。并做了。 :)