1

I use checkbox in my yii2 project. I want to resize it but don't know how to do that. Can I resize checkbox in yii2? How to do that?

This is my code:

$form->field($model, 'id')->checkbox(['label' => '  Vote', 'size' => 'lg'])
1
  • 1
    That is not related to yii or php anyway, tag your question as css and bootstrap. Commented May 16, 2016 at 11:08

1 Answer 1

4

Try this :

create a CSS class and apply properties as you want

.custom{
  width: 30px !important;
  height: 30px !important;
}

Use class in your Yii code :

<?=$form->field($model, 'id')->checkbox(['label' => 'Vote', 'class' => 'custom']) ?>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.