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
Farihin GhaffarFarihin Ghaffar 

visualforce page coding - unnecessary blank space

Hello – I created a visualforce page to allow a contact image to be added to the contact creation page. It worked out fine, but I have a lot of blank space around the image so now the fields after it are so far away. Does anyone know how I can shrink the empty spaces?
Below is the visualforce code I used:
 
1. <apex:page standardController="Contact">
2. 
3. <apex:repeat value="{!Contact.Attachments}" var="att">
4. 
5. <apex:image width="100" height="100" rendered="{!att.ContentType='image/jpeg'}" value="{!URLFOR($Action.Attachment.Download, att.Id)}"/>
6. 
7. </apex:repeat>
8. 
9. </apex:page>
 
James LoghryJames Loghry
I would try condensing the tags so that they're loser together.  In other words, remove empty lines 4 and 6.  It could also be that your width and height are set incorrectly and thus the images are looking odd.