简体   繁体   English

div并没有占据整个空间

[英]Div not occupying entire space

I have this piece of code in which the div men are not occupying the entire height available.It may be a basic doubt but as I am a newbie plz help me JSFiddle http://jsfiddle.net/7U3aX/ 我有一段代码,其中div人并没有占据整个高度。这可能是一个基本的疑问,但是由于我是新手,请帮助我JSFiddle http://jsfiddle.net/7U3aX/

        <div data-role="navbar">

            <ul>
                <li><a href="#men" data-ajax="false">Men</a></li>
                <li><a href="#women" data-ajax="false">Women</a></li>
                <li><a href="#kids" data-ajax="false">Kids</a></li>
            </ul>

        </div>

        <div id="men" style=" width:100%; height:100%; position:absolute"  >


            <div id="men_Promotion" style=" height:34%; background-color: green" >

            </div>
            <div id="men_Category" style=" height:33%; background-color: black" >

            </div>
            <div id="men_BrandPromo" style=" height:33%; background-color: blue"  >

            </div>

        </div>

Adding the following styles to the navbar div will do the job: 在导航栏div中添加以下样式即可完成此工作:

<div data-role="navbar" style=" z-index: 1; position: absolute; ">

fiddle? 小提琴? http://jsfiddle.net/7tGTw/ http://jsfiddle.net/7tGTw/

Take A look at DEMO 看看DEMO

You need to add One More Css rule In your style. 您需要在样式中添加一个更多的CSS规则。

 .ui-tabs{
            position:static;
        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM