Hi

I have a big label and a small label, and I want to "align-bottom" these
labels when added in HorizontalPanel:

public void onModuleLoad() {

Label bigTitle = new Label("BIG");
bigTitle.setStyleName("big");

Label smallTitle = new Label("small");
smallTitle.setStyleName("small");

HorizontalPanel panel = new HorizontalPanel();
// this style will set vertical-align: bottom
panel.setStyleName("my");

panel.add(bigTitle);
panel.add(smallTitle);

 RootPanel root = RootPanel.get();
root.add(panel);
}


and here is my CSS:

.my {
vertical-align: bottom;
background: yellow;
}

.big {
font-size: 15px;
font-weight: bold;
background: red;
}

.small {
font-size: xx-small;
background: blue;
}


The problem is the smallTitle is always top aligned.


The following is what I observed in Firebug, and it seems that both labels
are set to style="vertical-align: top"

<table class="my" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<div class="big">BIG</div>
</td>
<td align="left" style="vertical-align: top;">
<div class="small">small</div>
</td>
</tr>
</tbody>
</table>


It doesn't help if I
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM).

How can I align the labels to the bottom of HorizontalPanel?


-- 

Hez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to