开发者

element extends to end of line - can this be prevented?

开发者 https://www.devze.com 2023-01-16 15:48 出处:网络
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<

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;

0

精彩评论

暂无评论...
验证码 换一张
取 消