thanks  4 ur reply but if u could explain to me why in (A) it's  
applied to a 'span' just like in (B), yet it works - the only  
difference is that in (B) I've replaced the 'p' tag with a 'fieldset'.
I have tried before using 'display: block', causes the radio buttons  
to display on a different line which is something I am trying to avoid  
if I can.

On 26 Sep 2009, at 15:00, Alan Gresley wrote:

> MOHAMMED NASEER wrote:
>> can someone tell me, a newbie, why in code (A) the 'width'  works,  
>> but  in code (B) it doesn't  :
> [...]
>> fieldset {
>>   clear: left;
>>   border:0;
>>   margin-top: 10px;
>> }
>> .first_label {
>>   width: 230px;                               /*   
>> <------------------   NOT FUNCTIONING */
>>   font-weight: bold;
>>   text-align: right;
>>   margin-right: 10px;
>> }
> [...]
>>              <fieldset><span class="first_label">Rate your </  
>> span>                                 /* <------------------   NOT   
>> FUNCTIONING */
>>          <label>
>>          <input name="skill" type="radio" value="novice" />Novice</label>
>>          <label>
>>          <input name="skill" type="radio" value="intermediate" /   
>> >Intermediate</label>
>>          <label>
>>          <input name="skill" type="radio" value="advanced" />Advanced</  
>> label>
>>        </fieldset>
> [...]
>> ( I would imagine 'fieldset' in B to be a block level element just   
>> like 'p' in A, and 'span' in both A and B is inline element - but  
>> I  don't see why in A it works but in B it doesn't )
>
>
> Hello,
>
> You can not give a width to a <span> if it is treated as an inline  
> element. Does this help.
>
> .first_label {
>  display: block; /* Add */
>  width: 230px;
>  font-weight: bold;
>  text-align: right;
>  margin-right: 10px;
> }
>
>
>
> -- 
> Alan http://css-class.com/
>
> Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to