无法获得适合网格宽度的列

时间:2016-04-05 14:21:03

标签: html css semantic-ui grid-system

我使用的是语义用户界面,无法正确设置网格。根据文档,Semantic UI使用16列,我试图在左侧放置宽度为three的列,并在其旁边放置宽度为thirteen的列。这是它的外观(图片被裁剪):

enter image description here

我已经使用Bootstrap很长时间了,现在尝试使用Semantic UI。我错过了什么? Demo

<header>
    <div class="mobile hidden">
        <div class="ui container">
            <div class="ui grid">
                <div class="eight column">
                    <div class="ui secondary menu">
                        <a class="active item">
                            Home
                        </a>
                        <a class="item">
                            Messages
                        </a>
                        <a class="item">
                            Friends
                        </a>
                        <div class="right menu">
                            <div class="item">
                                <div class="ui icon input">
                                    <input type="text" placeholder="Search...">
                                    <i class="search link icon"></i>
                                </div>
                            </div>
                            <a class="ui item">
                                Logout
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<div class="clearing"></div>
<div class="ui container">
    <div class="mobile hidden">
        <div class="ui grid row">
            <aside class="three column red">

            </aside>
            <section class="thirteen column olive">
                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab doloremque illum quas? Dolore dolorem dolorum ipsum? Commodi error excepturi laboriosam magnam nobis odio suscipit unde! Alias atque dicta reiciendis sapiente!
            </section>
        </div>
    </div>
</div>

1 个答案:

答案 0 :(得分:2)

您在wide元素中缺少另外两个类fieldHTML。改变如下

<aside class="three wide field column red"></aside>
<section class="thirteen wide field column olive">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab doloremque illum quas? Dolore dolorem dolorum ipsum? Commodi error excepturi laboriosam magnam nobis odio suscipit unde! Alias atque dicta reiciendis sapiente!
</section>