如何让HTML导航栏与标题在同一行

How to make HTML navigation bar on the same line as the heading

如何让我的标题和导航栏在同一行?在页面顶部,您会看到大多数网站都有?

HTML:

<div class="heading">
    <div class="A">
    </div>
    <div class="B">
    </div>

</div>

CSS:

.heading {

    width:100%;
    height:50px;
    margin-top:0px;
    background-color: red;

}

.A {
    width: 20%;
    height: 100%;
    margin: 0px;
    float:left;
    background-color: blue;
}

.B {
    width: 80%;
    height: 100%;
    margin: 0px;
    float:left;
    background-color: orange;
}

我想您没有使用 HTML / CSS 的经验?

也许您应该更多地记录您的问题...

如果对您有帮助,请将此标记为答案...