开发者

Heading text is blocking floated elements

Please have a look:

http://jsfiddle.net/JeaffreyGilbert/b8Fd开发者_开发百科C/

How to place button above the line in IE7? Please don't change the HTML structure. Thanks.


do the simple hack , change the order. write <button> before the text and also write float:left on h2

<h2>
 <button>Action button</button>
 This is heading 2   
</h2>

DEMO

Note: also can work only writing float:left on h2 but then complete div slip below


From what I can tell, you'll have to change the structure by putting the the button element to before the "this is heading 2" text. (EDIT: diEcho beat me to it).
Otherwise you'll have to use position:absolute which can cause other problems. Using position:relative on the h2 may help.

Example

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜