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/