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
success22success22 

style attribute not working in IE

Please find my VF code below:

<apex:page controller="ContestDisplayController" id="page" showHeader="false" sidebar="false">
<apex:pageBlock title="Contest Images" id="block">
<apex:repeat value="{!contstPicList}" var="contnt" id="blckTable">
<apex:outputPanel layout="block" style="float:left;height:110px;margin:5px">
<a href="{!contnt.Document_URL__c}" target="_top">
<apex:outputField value="{!contnt.Picture__c}"/>
</a>
</apex:outputPanel>
</apex:repeat>
</apex:pageBlock>

</apex:page>

 

I have an inline style in ouputPanel tag but this is not working in IE browsers. And working in Chrome and Mozilla. 

Can anyone suggest me where I have done wrong?

Best Answer chosen by Admin (Salesforce Developers) 
success22success22

Thank you so much for responding my query but your code didn't work. But my problem has solved. I just checked compatibility view for my IE 7 and IE8 browser and problem got solved.

 

Thank you....

All Answers

NehaKSNehaKS
<apex:page controller="ContestDisplayController" id="page" showHeader="false" sidebar="false">
<style>
.op
{
float:left;
height:110px;
margin:5px;
}
</style>
<apex:pageBlock title="Contest Images" id="block">
<apex:repeat value="{!contstPicList}" var="contnt" id="blckTable">
<apex:outputPanel layout="block" class="op" id="op1">
<a href="{!contnt.Document_URL__c}" target="_top">
<apex:outputField value="{!contnt.Picture__c}"/>
</a>
</apex:outputPanel>
</apex:repeat>
</apex:pageBlock>

</apex:page>

 Try this code. It works for every browser. If it works for you then do mark it as a solution.

NehaKSNehaKS

Has this code worked out . Please let me know

 

success22success22

Thank you so much for responding my query but your code didn't work. But my problem has solved. I just checked compatibility view for my IE 7 and IE8 browser and problem got solved.

 

Thank you....

This was selected as the best answer