tags:

views:

39

answers:

1

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 positioning 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?

+1  A: 

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?

hairbymaurice
you're right, it had to be set to the strict doc type for it to work.
stelmate