D
D
des1roer2015-05-05 10:40:27
Yii
des1roer, 2015-05-05 10:40:27

Yii move out button?

I use yii bootstrap
and it turns out qx59Ix9.png
I don't use any divs

echo $form->dropDownList($model, 'name_id', $opts, array
    (
        'empty' => Yii::t('default', 'выберите предка'),
    )
);
   $this->widget('bootstrap.widgets.TbButton', 
      array(       
        'label'=>'Добавить шаблон',
        'htmlOptions'=> array('onclick' => 'on()',   
            ),
      ));

from firebug
<select id="Template_name_id" name="Template[name_id]">
<a id="yw4" class="btn" onclick="on()">Добавить шаблон</a>

css select
select {
    background-color: #ffffff;
    border: 1px solid #cccccc;
    width: 220px;
}
select, input[type="file"] {
    height: 30px;
    line-height: 30px;
}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
    border-radius: 4px;
    color: #555555;
    display: inline-block;
    font-size: 14px;
    margin-bottom: 10px;
    padding: 4px 6px;
    vertical-align: middle;
}
input, button, select, textarea {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}
label, input, button, select, textarea {
    font-weight: normal;
}
label, select, button, input[type="button"], input[type="reset"], input[type="submit"], input[type="radio"], input[type="checkbox"] {
    cursor: pointer;
}

css buttons
.btn {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #f5f5f5;
    background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
    background-repeat: repeat-x;
    border-color: #cccccc #cccccc #b3b3b3;
    border-image: none;
    border-radius: 4px;
    border-style: solid;
    border-width: 1px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #333333;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 0;
    padding: 4px 12px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    vertical-align: middle;
}
a {
    text-decoration: none;
}
body {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
des1roer, 2015-05-05
@des1roer

it was necessary to remove
margin-bottom: 10px from the select;

S
Sergey, 2015-05-05
@butteff

Make the button the other way:
Do not forget to include namespaces:
If for some reason you need this TbButton, then just look in the firebug, what styles are crawling, change the css and write it down.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question