nyanev
nyanev

Reputation: 11519

Yii CActiveFormWidget css style

I'm developing web site using Yii framework. I need form and use CActiveFormWidget. How can I style input fields and buttons with CSS? Which is the CSS class for button or textfield?

Upvotes: 1

Views: 2512

Answers (2)

Onkar Janwa
Onkar Janwa

Reputation: 3950

You can use your custom themes for your website. Yii supports to themes. You can create your own theme in Themes folder, and you can define your theme in config file main.php.

Yii Theming

Upvotes: 2

Afnan Bashir
Afnan Bashir

Reputation: 7429

If not necessary to modify existing classes you can assign class to each text field and button by passing class attribute

<?php 
echo $form->textField($model,'search',array(
  'size'=>60,
  'maxlength'=>255, '
  class'=>'search'
)); ?>

other than that if you want to change default form css it is form.css and you would need to look into div.form input, div.form textarea, div.form select depending on your needs

Upvotes: 2

Related Questions