function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rolando EstevesRolando Esteves 

<apex:outputField value="{!Noticia__c.noticiaDetailImg__c}" style="float:right;"/>

Hi,

 

Im having problems applying CSS styles to <apex:outputfield> . I am displaying an image from a rich field. when I try to apply the float:right; css propertie it does not work.

 

Someone knows how to fix this?

 

Thanks in advance!

 

REG

h8r41dh8r41d

Try using a CSS class for your inputs, then use styleClass="whateverstyleclass" in the outputField tag.

 

 

Gabriel Alack
Contact Us - We Can Help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x122

Rolando EstevesRolando Esteves

Already tried that and is not working. I think it has to do something with the HTML that is generated.

ssfdcssfdc

Use an outPutText field.

 

<apex:outputText escape="false" value="{!Your value}" styleClass="myStyleClass"/>

 

This will wrap the Rich text field output in a span with class myStyleClass,

so if its an image the styling would be applied as follows.

 

span.myStyleClass img {

   width:40px;

   height:40px;

   float:right;

}