469,366 Members | 2,342 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

div position

Hello,

I have a page with 2 divs :

<div id="box_out" style="position: absolute; width: 600px; height: 500px;
overflow: scroll; border: 1px solid #f00;">
<div id="box_in" style="position: absolute; width: 550px; overflow: visible;
border: 1px solid #00f;">
This is some text<br>
This is some text<br>
This is some text<br>
</div>
</div>

I'd like to move the div "box_in".
I tried :

document.getElementById("box_in").style.top = 100 ; # IE / opera =no
problem, but no move in Firefox !
document.getElementById("box_in").style.posTop = 100 ; # IE / opera =no
problem, but no move in Firefox again !

Can you tell me how to move the "box_in" dynamicaly with Firefox ?

Many thanks in advance,

--
pierre
Aug 24 '06 #1
2 4515
"pierre" <pi****@no-spam.orga écrit dans le message de news:
44***********************@news.free.fr...
Hello,

I have a page with 2 divs :

<div id="box_out" style="position: absolute; width: 600px; height: 500px;
overflow: scroll; border: 1px solid #f00;">
<div id="box_in" style="position: absolute; width: 550px; overflow:
visible; border: 1px solid #00f;">
This is some text<br>
This is some text<br>
This is some text<br>
</div>
</div>

I'd like to move the div "box_in".
I tried :

document.getElementById("box_in").style.top = 100 ; # IE / opera =no
problem, but no move in Firefox !
document.getElementById("box_in").style.posTop = 100 ; # IE / opera =>
no problem, but no move in Firefox again !

Can you tell me how to move the "box_in" dynamicaly with Firefox ?

Many thanks in advance,

--
pierre
oops, document.getElementById("box_in").style.top seems to be ok in
Firefox... I have troubles with the value assigned...
sorry
Aug 24 '06 #2
pierre wrote:
document.getElementById("box_in").style.top = 100 ;
Measurements need units. Try "100px".

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Aug 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Felix Natter | last post: by
3 posts views Thread by Markus Ernst | last post: by
3 posts views Thread by akunamatata | last post: by
4 posts views Thread by Guy | last post: by
6 posts views Thread by Gérard Talbot | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.