2014-09-03 125 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

回答