You need to sign in to do that
Don't have an account?

Controlling distance / spacing between outputLabel and other components
I am creating a custom visualforce page with custom controller. Several of my properties return non-sobject values such as string and boolean types. As such no automatic label is created and I must use the outputLabel component. When I do this as in the code sample below, the spacing between the label and bound field component are so great that it is confusing to the eye. How would I go about specifying a tighter spacing?
<apex:pageBlockSection title="Spacing Test"> <apex:outputLabel value="Checkbox" for="theCheckbox"/> <apex:inputCheckbox value="{!inputValue}" id="theCheckbox"/> </apex:pageBlockSection>
I have also tried simply putting raw text next to the input component such as:
<apex:pageBlockSection title="Spacing Test">
ToCheckorNotToCheck<apex:inputCheckbox value="{!inputValue id="theCheckbox"/>
</apex:pageBlockSection>
Cheers,
Tyler
Use following :
<apex:pageBlockSection title="Spacing Test">
ToCheckorNotToCheck <apex:inputCheckbox value="{!inputValue id="theCheckbox"/>
</apex:pageBlockSection>
try this one and see the magic.
To provide the space between label and component use :
<label style="padding-left:20px" >// text here</label>
Hope this helps.