2014-09-03 101 views
0

我新手ZK框架,我使用ZK插件Grails中 .The 组合框宽度过大,它占据整个DIV宽度,其被动态生成。该代码是下面:如何设置ZK组合框宽度

<div id="i5CQc5-pp" class="z-combobox-popup z-combobox-open z-combobox-shadow" style="z-index: 1800; width: 1747px; height: auto; position: absolute; top: 219px; left: 139px;" tabindex="-1"> 
    <ul id="i5CQc5-cave" class="z-combobox-content" style="height: auto; width: 100%;"> 
     <li id="i5CQd5" class="z-comboitem"><span class="z-comboitem-image"></span><span class="z-comboitem-text">pass</span></li> 
     <li id="i5CQe5" class="z-comboitem"><span class="z-comboitem-image"></span><span class="z-comboitem-text">fail</span></li> 
    </ul> 
</div> 

和下面的CSS:

element.style { 
    z-index: 1800; 
    width: 1747px; 
    height: auto; 
    position: absolute; 
    top: 219px; 
    left: 139px; 
} 

.z-combobox-popup, .z-combobox-popup { 
    font-size: 917em; 
} 

.z-combobox-popup, .z-combobox-popup { 
    font-size: 917em; 
} 

.z-combobox-shadow, .z-bandbox-shadow, .z-datebox-shadow { 
    -webkit-border-radius: 3px; 
    border-radius: 3px; 
    -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.35); 
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.35); 
} 

.z-combobox-popup { 
    overflow: auto; 
} 

.z-combobox-popup, .z-bandbox-popup, .z-datebox-popup, .z-timebox-popup { 
    font-family: Arial, Sans-serif; 
    font-weight: normal; 
    font-size: 12px; 
    display: block; 
    border: 1px solid #cfcfcf; 
    padding: 2px; 
    background: #fff; 
    position: absolute; 
    overflow: hidden; 
} 

如何设置宽度,使得最小宽度将是相同组合框

OR

如何设置宽度使得最小宽度将与组合框相同并且

+0

这是生成的代码吗?我没有使用Grails的经验,但是使用正常的zul文件。 – chillworld 2014-09-03 21:11:35

回答