开发者

Dynamic-sizing <div> tag

I'm trying to create a dynamic tag with absolute positioning. In my trial runs I was able to set the left:right:top:bottom: properties to have the div dynamically conform to it's parent element's size. I'm now trying to do the same inside of a browser control in C# but am not seeing the absolution pos开发者_如何学Pythonitioning being respected?

<span style='padding:3px 0px; border:1px solid red; background-color:orange; margin:0  10px; display:inline-block; position:relative;'>

<div style='position:absolute; top:10px; bottom:10px; left:-10px; right:-10px; background-color:red; display:block; border:1px solid green;'></div>"

</span>

Any ideas?


Are you seeing the other style attributes being rendered?

Might be worth checking that you have all the correct Mark up on the page. Have you got the correct doc type declarations transitional/strict etc etc etc?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜