You need to sign in to do that
Don't have an account?
sampath kumar 3
Is it possible to align the commandbutton left side of the page block ?
Hi, I'm new to VF , I tried to align commandbutton to the left side of the pageblock by using dir property even though it is not working .
Can any one suggest me how to resolve this issue
FYI:
<apex:page id="pg">
<apex:form id="fm">
<apex:pageBlock title="Contact Details" dir="LTR">
<apex:pageBlockButtons location="top" dir ="LTR" >
<apex:commandButton/>
</apex:pageBlockButtons >
</apex:pageblock>
</apex:form>
</apex:page>
Can any one suggest me how to resolve this issue
FYI:
<apex:page id="pg">
<apex:form id="fm">
<apex:pageBlock title="Contact Details" dir="LTR">
<apex:pageBlockButtons location="top" dir ="LTR" >
<apex:commandButton/>
</apex:pageBlockButtons >
</apex:pageblock>
</apex:form>
</apex:page>
you can try this
<apex:commandButton value="test" style="margin-left:70%;"/>
margin-left: to push toward right hand side
margin-right to to push toward left hand side
Try with below code it wil help !!
Let me know if it helps !!
Thanks
Manoj
but i belive it about "align the commandbutton left side"
the code you have mention do not have any styling to do that ??
FYI: <apex:page>
<apex:form id="fm">
<apex:pageBlock>
<apex:pageBlockButtons >
<div id='header' style="margin-left:70%;" onclick='controllerAction();'>
save
</div>
</apex:form id="fm">
</apex:pageBlock>
</apex:pageBlockButtons > </apex:page>
as mentioned below
<apex:commandButton value="test" style="margin-right:70%;"/>
<apex:commandButton value="test" style="text-align:left;" />
if that doesn't work - wrap it in a Div and put the styling on the div
<apex:page>
<head>
<style>
.bPageBlock .pbTitle {
width: 0%;
}
</style>
</head>
<apex:form id="fm">
<apex:pageBlock title="Contact Details" dir="LTR">
<apex:pageBlockButtons style="width:100%" location="top" dir="LTR" >
<apex:commandButton value="test" style="margin-right:70%;" />
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockButtons>
<div id='header' style="margin-left:70%;" onclick='controllerAction();'>
save
</div>
</apex:form id="fm">
</apex:pageBlock>
</apex:pageBlockButtons >
</apex:page>
<apex:page>
<head>
<style>
.bPageBlock .pbTitle {
width: 0%;
}
</style>
</head>
<apex:form id="fm">
<apex:pageBlock>
<apex:pageBlockButtons>
<div id='header' style="margin-left:70%;" onclick='controllerAction();'>
save
</div>
</apex:pageBlockButtons >
</apex:pageBlock>
</apex:form>
</apex:page>
<style>
.bPageBlock .pbTitle {
width: 0%;
}
</style>
<apex:pageBlock> ,<apex:pageBlockButtons> it render as table td and div and these are some classes which salesforce defult bind to those rendered components in backend i am just overriding it as per requirement
did you try that did it work for you ??