开发者

Container floating problem

开发者 https://www.devze.com 2023-02-21 22:12 出处:网络
Hey, I have a big problem with my container-sketch. How can I realize this ? When I set the width from the two navigations (blue container) there are under the logo (red container). The two navigati

Container floating problem

Hey, I have a big problem with my container-sketch. How can I realize this ? When I set the width from the two navigations (blue container) there are under the logo (red container). The two navigation will run across the screen, right next to the logo. If I resize the browser window, the two navigations should NOT slide under the logo. Has anybody a example for me ?

<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>New</title>
    <style type="text/css">

        .logo {
            float: left;
            width: 260px;
            height: 50px;
            background: green;
        }

        .nav-main {
            background: red;
        }

        .nav-sub {
            background: blue;
        }

    </style>
</head>

<body>
    <div class="header">
        <div class="logo">
            .logo
        </div>
        <div class="nav-main">
            .nav-main
        </div>
        <div class="nav-sub">
        开发者_StackOverflow    .nav-sub
        </div>
    </div>

</body>


.header{
 min-width:320px;  
}

check example


Try adding width to the nav-main and nav-sub

See http://jsbin.com/isuxu4 for a demo

0

精彩评论

暂无评论...
验证码 换一张
取 消