Reduce size of CButton

  • Stephen
    Stephen
    August 6, 2015 at 2:44 am

    Trying to limit the size of the [CButton] (using click to open) so it does not spread across the length of the grid. Tried using this in Meta Data, but it is not working:

    .clicktoopen {
    max-width: 50%;
    margin: 30px auto 0;
    }

    Any suggestions?
    https://couponpromosdaily.com/

  • Aaron
    Aaron
    August 6, 2015 at 3:18 am

    You could change this via css though the class is using
    btn btn-primary cbtn col-xs-12

    Changing it to col-xs-8 or col-xs-6 would give the desired result though you may need to center the button.


  • Josh
    August 6, 2015 at 10:22 am

    Try this in Design Setup >Custom Meta Data >Footer Styles
    [code title=””]
    <script>
    jQuery(“.cbtn”).toggleClass(‘col-xs-12 col-sm-7’);
    jQuery(“.cbtn”).addClass(‘col-sm-offset-2’);
    </script>
    [/code]

  • Stephen
    Stephen
    August 6, 2015 at 1:57 pm

    Thanks Aaron & Josh for your reply. Josh it worked for the coupon code button but not the other Cbutton (Deal).

    Aaron not sure how to change this (via css though the class is using btn btn-primary cbtn col-xs-12) a little above my knowledge and pay grade.


  • Josh
    August 6, 2015 at 2:07 pm

    Try this
    [code title=””]
    <script>
    jQuery(“.cbtn”).toggleClass(‘col-xs-12 col-sm-7’);
    jQuery(“.cbtn”).addClass(‘col-sm-offset-2’);
    jQuery(“.cbtr”).toggleClass(‘col-xs-12 col-sm-7’);
    jQuery(“.cbtr”).addClass(‘col-sm-offset-2’);
    </script>
    [/code]

  • Stephen
    Stephen
    August 6, 2015 at 2:22 pm

    Josh, That fixed both buttons; Thanks! The buttons are slightly off center, not sure how to nudge it over. But that cured 90% of the issue.
    Steve


  • Josh
    August 6, 2015 at 2:33 pm

    Try changing col-sm-offset-2 to col-sm-offset-3

  • Stephen
    Stephen
    August 6, 2015 at 9:07 pm

    Tried offset (col-sm-offset-2 to col-sm-offset-3) 2 leans to the left and 3 to the right, great suggestion. Appears it is one or the other, just dose not center. Shame 2.5 dose not work.

    Thanks again Josh

Viewing 8 posts - 1 through 8 (of 8 total)

Copyright © 2010-2020 PremiumPress Limited.

secure payments