开发者

Fieldset in IE ,Chrome and Firefox

This code is working fine in IE and Chr开发者_如何学Pythonome, except firefox..i have scratching my hair to adjust the fieldset in IE and chrome, but at the end i found out the "TRY ME" has run out of the position which was very different in IE and Chrome.. any solution for this?

css

fieldset 
{
margin: 0 0 1em 0;
width:490px;
border: 5px solid Black;
}

html

<fieldset>
<legend>
    <h2>
     TRY ME
    </h2>
</legend> 


legend elements are notoriously bad to style cross browser.

My best recommendation is to use the h2 outside of legend, and perhaps use legend as well, but hide it from view (text-indent: -9999px) (screen readers should still be able to access its semantic goodness).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜