link on imgae and text


i have a page which i design as dashboard.

i this page i have images for profile,course and change password.

i want that

if i click on the image corresponding link should open .

i am using <a> tag but it is not working .

is there any other way .

this is the example:

<div class="fl wd30 imgdiv">

                     <a href="#" class="profileimg">

                    <span class="imgtext">

                        Edit Profile




Are you trying to get something like <a href=""><img src=""></a>?

yupp but i am using image in background.

Set the style of this a.profileimg to display:block with the proper width and height.

Is the alt property necessary in this isse?

Do like this -

echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl->.'/images/image_name.png'), array('#'), array('class'=>'profileimg'));