Hi,
I have a DIV layer and in the style properties I set this:
That means everything inside the DIV should be 100pixels down from the top and 200pixels in from the left.
In IE the width/height of the DIV is 600/400 as expected, and object within (Flash) is offset by 200,100. I even animate the properties to move the Flash file around within the DIV by accessing obj.style.paddingLeft and obj.style.paddingTop. All works fine in IE.
In Firefox 1.0.6/Netscape 8.0.2 and Netscape 7.0 things are wrong. The DIV is larger than 600x400. Instead it's 800x500. The padding appears to have made the DIV larger. If I output the width/height in an alert it reports 600x400 but it's clearly not. When I run the padding animation the size of the DIV is changing accordingly. It's easy to see this because I put a background color on the DIV.
I'm not tied to using padding, anything else that achieves positioning of an object within a DIV on a pixel basis would do the trick. It MUST be via a DIV style property though. I can think of several other ways of achieving this (put the Flash in a table, put in another DIV and position relative to the parent, use some object/embed align properties etc etc). I can't use any of these though because of the limitations of a content-generation system. The only thing I can do to achieve this is to use some new additional DIV style properties.
I tried using margin also but that moved the whole DIV (even in IE) by the offset amount instead of altering anything inside the DIV.
I have overflow:hidden and clip:auto set on the DIV too but that's not helping.
Any ideas? I've browsed the DIV properties in Visual Studio .NET in quickwatch and don't see anything better than padding that I might use. It has to not only be a property I can set in the DIV definition, but should also be scriptable.
Thanks
~dd
I have a DIV layer and in the style properties I set this:
Code:
"position:absolute;width:600px;height:400px;padding:100px 0px 0px 200px;"
That means everything inside the DIV should be 100pixels down from the top and 200pixels in from the left.
In IE the width/height of the DIV is 600/400 as expected, and object within (Flash) is offset by 200,100. I even animate the properties to move the Flash file around within the DIV by accessing obj.style.paddingLeft and obj.style.paddingTop. All works fine in IE.
In Firefox 1.0.6/Netscape 8.0.2 and Netscape 7.0 things are wrong. The DIV is larger than 600x400. Instead it's 800x500. The padding appears to have made the DIV larger. If I output the width/height in an alert it reports 600x400 but it's clearly not. When I run the padding animation the size of the DIV is changing accordingly. It's easy to see this because I put a background color on the DIV.
I'm not tied to using padding, anything else that achieves positioning of an object within a DIV on a pixel basis would do the trick. It MUST be via a DIV style property though. I can think of several other ways of achieving this (put the Flash in a table, put in another DIV and position relative to the parent, use some object/embed align properties etc etc). I can't use any of these though because of the limitations of a content-generation system. The only thing I can do to achieve this is to use some new additional DIV style properties.
I tried using margin also but that moved the whole DIV (even in IE) by the offset amount instead of altering anything inside the DIV.
I have overflow:hidden and clip:auto set on the DIV too but that's not helping.
Any ideas? I've browsed the DIV properties in Visual Studio .NET in quickwatch and don't see anything better than padding that I might use. It has to not only be a property I can set in the DIV definition, but should also be scriptable.
Thanks
~dd