element extends to end of line - can this be prevented?
I have a form with the following...
<dt class=idx><span>Sex:</span></dt><dl><fieldset>Male<input type="radio" name="Sex" value="Male" checked>Female<input 开发者_C百科type="radio" name="Sex" value="Female"></fieldset></dl>
the problem is that the box created by the fieldset extends to the right margin. I'd like it to extend only as far as necessary to include the two radio buttons. The dt, dl, and scan stuff is there to effect spacing and leaders.
Change your fieldset tag to this:
<fieldset style="display: inline-block;">
Sounds like CSS has a width:100% in place on one of the items, you maight want to try width:auto; or display:inline;
精彩评论