I have 2 commondbutons inside a div, initially display hidden .

<div  style="width:1000px;height:50px;text-align:left;">
    <apex:commandButton value="Save" oncomplete="triggerBlurEvents();"   id="saveButton" style="display:none" />
    <apex:commandButton action="{!cancel}" value="Cancel" id="cancelButton" reRender="thePageBlock" style="display: none;" />

These buttons can be shown 1. on javacript function call :

<script>  function show()
<apex:selectList value="{!k.Abv_Core_KAM_Competitor_Product__c}" multiselect="false" size="1" onchange="show();"  >

And, from 2. inline-editing :

<apex:inlineEditSupport event="ondblClick"   showOnEdit="saveButton,cancelButton" hideOnEdit="AddMoreButton" />

In 1. scenario save and cancel button are displayed on top of another and in 2. scenario they are shown side by side. Can anyone help me with this issue ? .Here is the screenshotenter image description here

  • user59759, I've edited your post for you such that your code now appears. In the future, please be certain to look at the preview of your post before before saving it to make certain everything is displayed. Select your pasted code and click on the Formatted Text Icon to quickly assure it will be displayed properly. That will save you lots of time compared to manually spacing each line over by 4 spaces. – crmprogdev Jan 4 '15 at 16:29
  • 1
    Do you happen to have standard style sheets disabled on the page in your second example? This would seem to be an expected issue that would be resolved using CSS on a button. See the effect of display property on inline block level elments beginning with section 9.2 at w3.org/TR/CSS21/visuren.html#block-formatting for more on the subject. SF should handle this issue with their standard CSS. – crmprogdev Jan 4 '15 at 19:13
  • No i haven't used any standard CSS so far in this page – user59759 Jan 4 '15 at 19:21
  • thasnks a lot @crmprogdev !! it got worked with display='inline-block'. thanks for the link ! – user59759 Jan 4 '15 at 19:41

thanks @crmprogdev .. updated the code as below


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.