I am currently using yii framework for my development and I have encountered an issue. While writing CSS, I was able to align my <input
tags in HTML properly. However, when I applied the same CSS to yii, the alignment got messed up. Can anyone offer some assistance with this?
I am aiming for the following layout:
Below is the code snippet from yii:
<div id="gender">
<label>Gender :</label>
<?php echo CHtml::radioButtonList('gender_code','',array('Male'=>'Male','Female'=>'Female'),array('separator'=>,'')); ?>
</div>
CSS Styling:
<style type="text/css">
div#gender {
margin-top:20px;
margin-left:200px;
}
div#gender label
{
font-weight: bold;
font-size: 0.9em;
float:left;
margin-left:2px;
text-align:left;
width:100px;
}
</style>
The output appears as shown in the image below: