473,395 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 4678
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Felix Natter | last post by:
hi, I have a structure like: <topic name="xxx"> <subtopic name="subxxx"> <subsubtopic name="subsubxxx"> </subsubtopic> </subtopic> </topic>
3
by: Markus Ernst | last post by:
Hello Reading the follwing document: http://www.w3.org/TR/WD-positioning-970131#In-flow it seems very clear that position:relative should be relative to the parent element. So in the following...
8
by: Jaime Rios | last post by:
Hi, I created a COM AddIn for Word that performs the functions that it needs to, but I needed to add the ability for the toolbar created by the COM AddIn to remember it's last position and...
3
by: akunamatata | last post by:
Hello everyone, I contact this discussiongroup because I encountered a little problem with XSL. Let me explain it: I have following file "position.xml": <?xml version="1.0"?>...
4
by: Guy | last post by:
Hi, I read an XML file to an XMLDocument and iterate through its nodes. How do I get the XPath position (index) of a certain element? For example If I on the second "b" node I want to get "2": ...
6
by: Gérard Talbot | last post by:
Hello fellow stylers, When trying this page http://www.gtalbot.org/BrowserBugsSection/PercentualRelativePositioning.html I get different rendered layouts with IE 6, IE 7 beta 2, Firefox...
4
by: Petra Meier | last post by:
Hi, I use the common code to determine the position of an element getTop = function(o){ var nTop = null; if(o){ do{ nTop += o.offsetTop;
2
by: agbee1 | last post by:
Hello: I've finally made the effort to ween myself from overly using tables and use CSS for my positioning. However, I am having a problem with my navigational menu properly aligning in Firefox,...
0
by: crisscross27 | last post by:
Hi, I found a page called "myflashfetish" where you chan choose mp3 players for my space, well the problem is this, I wanted to place 2 or more players in myspace in a particular place, I read...
1
by: spynx | last post by:
import javax.swing.JOptionPane; import java.io.*; import java.util.Arrays; public class election5 { public static void main( String args ) {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.