Bootstrap Carousel Image Hieght

I am using the following bootstrap Carousel widget.


 $this->widget(

    'bootstrap.widgets.TbCarousel',

    array(

    'items' => array(

    array(

    'image' => bu('images/first-placeholder830x400.gif'),

    'label' => 'First Thumbnail label',

    'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'

    ),

    array(

    'image' => bu('images/second-placeholder830x400.gif'),

    'label' => 'Second Thumbnail label',

    'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'

    ),

    array(

    'image' => bu('images/third-placeholder830x400.gif'),

    'label' => 'Third Thumbnail label',

    'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'

    ),

    ),

    )

    );



Problem is , whenever it slides to next image, it adjusts itself with different height/ How can I force the carousel to stay at a fixed height

you can set height on image as an attribute, or you could use css

Setting height on the image is the best way i think but my image is loaded in the following way…


 'image' => Yii::app()->baseUrl.'/'.CHtml::encode($record['file_location']),

not sure where i can mention the height attribute above :s

try setting the width in


imageOptions


array(

    'image' => bu('images/third-placeholder830x400.gif'),

    'label' => 'Third Thumbnail label',

    'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.',

'imageOptions'=> array('width' => 200)

    ),

it works!! :D