| re: right position of Div tag
Paul, thanks for your answer. I really didnt give you the full
picture. The thing that I am trying to do is overlay events in a
calendar. Since some events are one day and other are more, I would
need both the left and right positions. So, now a div element can be
overlayed either 1 or many td's.I am not sure if this is posible since
I have other concerns of resizing the page.
thanks for your help
Paul Wellner Bou <paul.wellner@united-scripts.com> wrote in message news:<oprwokxzptq6cjlk@news.individual.net>...[color=blue]
> Hi John,
>
> I read some day something about a very strange method to
> get the position of elements of a HTML Document even if the
> elements aren't postioned absolutely, but I don't remember
> and I never used it. Anyway, it only worked in IE, if I remember
> it well.
>
> Answering your question...
> Does the div, you mentioned, has an absolute position?
> You place it with
>
> [HTMLDivElement].style.left = "10px";
>
> (or any other value) at the place you want it to appear?
>
> If you want to do it relative to the right margin, why don't you
> use ...style.right instead?
>
> If you can't use that, it will be difficult to get the right value,
> if the width of this element isn't fixed.
> But you can fix the width of the div by css (or JavaScript setting
> the CSS Property). Then the right value is width+left.
>
> In Addition you can use overflow: hidden or overflow: auto to
> avoid that the width of the div changes if there is some content
> like images that forces the div to increase its width automatically.
>
> Hope I helped you.
>
> Saludo
> Paul.[/color] |