PDA

View Full Version : [CLOSED] Label alignment and justification



cwolcott
Aug 15, 2012, 2:14 PM
I have a label within a fieldset that I would like to be justified across the top of the fieldset.
I was hoping to assign the StyleSpec="text-align: justify; text-justify: inter-word", but that didn't work.



<ext:FieldSet runat="server" Title="Approval" Collapsible="true" >
<Items>
<ext:Label runat="server" StyleSpec="background-color: rgb(255,255,100); text-align: justify; text-justify: inter-word"
text="A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words." />
<ext:TextField runat="server" FiedLabel="First Name" />
<ext:TextField runat="server" FiedLabel="Last Name" />
</Items>
</ext:FieldSet>


Any thoughts?

Daniil
Aug 15, 2012, 2:55 PM
Hi,

Please add

display:inline-block;
or use a DisplayField instead.

cwolcott
Aug 15, 2012, 3:41 PM
OK, when I add display: inline-block the text in the label is justified, but the First Name Textfield is now on top of the wrapped text. Using Chrome to inspect the element the class .x-label has a height: 16px which might be causing issues.

I will look at DisplayField now.

cwolcott
Aug 15, 2012, 3:47 PM
DisplayField works grgeat. Please close the thread.



<ext:FieldSet runat="server" Title="Approval" Collapsible="true" >
<Items>
<ext:DisplayField runat="server" StyleSpec="text-align: justify; text="A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words. A lot of words."" />
<ext:TextField runat="server" FiedLabel="First Name" />
<ext:TextField runat="server" FiedLabel="Last Name" />
</Items>
</ext:FieldSet>

Daniil
Aug 15, 2012, 5:24 PM
when I add display: inline-block the text in the label is justified, but the First Name Textfield is now on top of the wrapped text. Using Chrome to inspect the element the class .x-label has a height: 16px which might be causing issues.

I just discovered that I can't see FieldLabels at all with your initial code. We are investigating.

Daniil
Aug 15, 2012, 6:06 PM
I just discovered that I can't see FieldLabels at all with your initial code. We are investigating.

Do not panic, there is just an incorrect name "FiedLabel" in your code :)



when I add display: inline-block the text in the label is justified, but the First Name Textfield is now on top of the wrapped text. Using Chrome to inspect the element the class .x-label has a height: 16px which might be causing issues.


I am unable to reproduce. If you would provide a sample, we will be glad to investigate.