change the style of a image

Hi everyone again,

I have the next code:




<?php $this->widget('zii.widgets.CDetailView', array(

	'data'=>$model,

	'attributes'=>array(

		'id',

		'dni',

		'nom',

		'cognoms',

		'adresa',

		'data_naiximent',

		'telefon_1',

		'telefon_2',

		'correu_electronic',

		'lloc_naiximent',

		'poblacio', 

		array(

			'type'=>'image',

			'name'=>'foto',			

		), 

	),

)); ?>



I wanna change the image style of




array(

    'type'=>'image',

    'name'=>'foto',

),



I tried:




array(

    'type'=>'image',

    'name'=>'foto',

    'htmlOptions'=>array(

	'width' => 100,

	'height' => 100,

    ),

),



but it don’t work, how can i place this style to the image?

[b]Grettings and thanks,

s0mk3t[/b]

It looks like that you cannot pass the htmlOptions to the image, but only to the table cell.

You can:

give a class to the cell, and then use css:




array(

    'type'=>'image',

    'name'=>'foto',

    'htmlOptions'=>array(

        'class'=>'trWithPhoto'

    ),

),



And css:




tr.trWithPhoto img

{

   width: 100;

   height: 100:

}




Or use type raw:




array(

    'type'=>'raw',

    'name'=>'foto',

    'value'=>'CHtml::image($this->foto, "", htmlOptions=>array(

        "width" => 100,

        "height" => 100,

    ))'

),




Thanks for your answer, but dont work… =(