You need to sign in to do that
Don't have an account?
Daniel Roberts
Hey everyone, trying to get a handle on VF pages, but having some trouble with the attribute cellpadding. My understanding is that it takes either px or % values, and should effect the internal padding of the cells, i.e. the cells should get bigger the larger the number.
Here is my code. Can anyone help me understand why there is no change in the cell's size?
Syntax for Cellpadding attribute on pageBlockTable?
<apex:page standardController="Contact" recordSetVar="contacts" lightningStylesheets="true"> <apex:pageBlock title="Contacts List"> <!-- Contacts List --> <apex:pageBlockTable cellpadding="1000px" value="{! contacts }" var="ct"> <apex:column value="{! ct.FirstName }"/> <apex:column value="{! ct.LastName }"/> <apex:column value="{! ct.Email }"/> <apex:column value="{! ct.Account.Name }"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
Hey everyone, trying to get a handle on VF pages, but having some trouble with the attribute cellpadding. My understanding is that it takes either px or % values, and should effect the internal padding of the cells, i.e. the cells should get bigger the larger the number.
Here is my code. Can anyone help me understand why there is no change in the cell's size?
<apex:dataTable value="{!account.Contacts}" var="contact"
cellPadding="4" border="1">
<apex:column>{!contact.FirstName}</apex:column>
<apex:column><b>{!contact.LastName}</b></apex:column>
</apex:dataTable>
I hope you will get cellpadding syntax from my code.
<apex:pageBlockTable value="{!Contacts}" width="100%" var="c" cellpadding="2">
And here is another example syntax.
I hope you will get cellpadding syntax from my previous post
It is not require, I taken to show format of cellpadding.