2013-07-30 44 views
0

我在GWT的HTML標籤GWT標籤與HTML CSS對於文本填充

Label L1 = new HTML("<span class=noMargin><img src=b0.png width=30 height=30></span><span class=legendText>$0 - $"+cutoffs.get(0)+"</span>"); 
    dock1.addNorth(L1,5); 

我想是要顯示的圖像對標籤的底部與文本要在標籤內垂直居中。最終發生的事情是,圖像和文本最終都會從legendText css獲得底部填充。這是有問題的CSS。

.legendText{ 
padding-bottom: 10px; 
} 

.noMargin{ 
padding-bottom: 0px; 
} 
+0

爲什麼不使用水平面板,中心佈局的包裝?這個內聯html看起來很髒.. –

回答