i want to give uparrow ,downarrow as label to submitbuttons,
so how to give a image to submitbutton
i want to give uparrow ,downarrow as label to submitbuttons,
so how to give a image to submitbutton
This is a css question. Set a background image for the button.
hi there,
you might want to try CHtml::imageButton();
Thanks resplendent
i want to insert image for the application that i am building
i used
image() method
public static string image(string $src, string $alt='', array $htmlOptions=array ( ))
i want to know does
$src = path to image file??? ex: D:\image\image.bmp
i put the path but it is not showing the mage
only the alternative text is displayed…
$src should be a URL, not a file system path.
here is a smaple CSS for your form.css
input[type='submit'] {
background: #009EEA url('http://c2eat.com/images/i22/submit.png') no-repeat left;
border-color: #aaa #000 #000 #aaa;
border:1px solid;
color:#FFFFFF;
display:block;
text-align:left;
height:26px;
width:100px;
padding-left:24px;
left:1px;
position:relative;
top:1px; }
input[type='submit']:hover {
border-color: #000 #aaa #aaa #000;
left:1px;
position:relative;
top:1px; }
i got this working:
<style>
.button1 {
background:url('<?php echo Yii::app()->request->baseUrl."/images/btn-deliver-gift.jpg"; ?>');
width:244px;
height:56px;
cursor:pointer;
border-radius: 12px;
}
</style>
<div class="form-row">
<?php echo CHtml::submitButton('',array('class'=>'button1')); ?>
</div>