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

Cannot format apex:outputField
The text does not align left it is always aligned center why?
<apex:outputField value="{!doc__c}" style="text-align:left" />
I have tried using a span without luck, any other ideas?
Hi,
Please try to use styleclass attribute of output field.
-S
Now if you want align it to the left or right, you should use float property of css.
Note : text-align - works for input field whereas; float - works for output fields.
I tried to use the float property without success the output is centered not left justified.
<b>Description</b>
<p >
<apex:outputField value="{!description__c}" style="float:left" />
</p>
for this you need to override the SFDC CSS.
Yes the outputField is in a pageBlock, is there an example of overriding the SFDC CSS?
try this,
<apex:outputPanel layout="block" style="text-align:left" >
<apex:outputField value="{!description__c}" />
</apex:outputPanel>
if not
<apex:outputPanel layout="block" styleClass="AlignOptFilld" >
<apex:outputField value="{!description__c}" />
</apex:outputPanel>
and in <style> tags
.AlignOptFilld span {
text-align:left;
}