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
Linda 98Linda 98 

URGENT!!! Display image on VF page

I am trying to display images on Vf page which i am able to but I want to display images horizantally on my VF page.

below is my VF page code which now displays images vertically.
 
<apex:page standardController="Account" extensions="AccountController" showHeader="false" sidebar="false" standardStylesheets="false">
    <table class="detailList" border="0" cellpadding="0" cellspacing="5">
        <apex:repeat value="{!Images}" var="I">
            <tr>
                <td><image src="{!I.url}" alt="{!I.name}"/></td>
            </tr>
        </apex:repeat>
    </table>
</apex:page>

 
Best Answer chosen by Linda 98
JeffreyStevensJeffreyStevens
Horizanally - you mean - the images should be side by side?

Try...
<table ...
  <tr> 
    <apex:repeat value="Images" var="I">
      <td><image src="{!i.url}" /></td>
    <apex:repeat
    </tr>
</table>

Just a guess though.

All Answers

JeffreyStevensJeffreyStevens
Horizanally - you mean - the images should be side by side?

Try...
<table ...
  <tr> 
    <apex:repeat value="Images" var="I">
      <td><image src="{!i.url}" /></td>
    <apex:repeat
    </tr>
</table>

Just a guess though.
This was selected as the best answer
Mahesh K 22Mahesh K 22
Hi Linda
<!DOCTYPE html> <html > <head> <style type="text/css"> #holder { display:table-cell; vertical-align:middle; text-align:center; height:300px; width:300px; border: 5px solid blue; } </style> </head> <body> <div id="holder"> <img src="duck.png"> </div> </body> </html>

Note: vertical-align  may be middle,right,left
Linda 98Linda 98
Thank you!!