kartik-v / yii2-widgets

Collection of useful widgets for Yii Framework 2.0
http://demos.krajee.com/widgets
Other
558 stars 175 forks source link

min-width in Colopicker #366

Closed AlessandroCuba closed 6 years ago

AlessandroCuba commented 6 years ago

Hallo Kartik,

The min-width: 65px (html5input.css linie 52) deforms the widget in my Modal. When I use 70px, it's perfect. Any solutions?

kartik-v commented 6 years ago

You can always override the CSS on your page by enclosing the widget in a div container of your choice:

<!-- your custom override styles (should ideally include and link from a separate CSS file) -->
<style>
.my-custom-container .input-group-sp.input-group-addon {
    min-width: 70px; /* override the styles */
}
</style>

<!-- render your widget in your custom container whose style you have overridden -->
<div class="my-custom-container">
    <?= kartik\color\ColorInput::widget([
        // your widget options
    ]) ?>
</div>