开发者

How to get options to quit moving

I have the following scenario:

开发者_如何转开发
<span>
      <input checked="checked" id="rad" name="rad" type="radio" value="1" /> Opt1
      <br />
      <input id="rad" name="rad" type="radio" value="2" /> Opt2 
</span>

 <span>   
        <button id="btn">Find</button>  
 </span>

Upon loading of the form, the button is invisible. When the user clicks on the option button (rad), the btn button becomes visible.

Works perfectly fine with one exception. When the button appears, it makes the size of line two larger and the white space between opt1 and opt2 increases. So from the users perspective, it looks like the lower radio button is moving.

How can I stop this?

thanks


It's hard to say without seeing the overall layout. But from what I'm understanding, I would make the first span display: inline-block which would force it to be treated as one element on a single line.


Proper form layouts are topic of their own:

http://www.alistapart.com/articles/prettyaccessibleforms

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜