473,396 Members | 1,940 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,396 software developers and data experts.

positioning layers

Hi,
I know that there are a lot of threads like this but I can´t resolve my problem.

Suppose that i have this html form:
Expand|Select|Wrap|Line Numbers
  1. ...
  2. <td>
  3.         <fieldset>
  4.             <legend>Other Info </legend>
  5.             <table><tr><td><label for="links">Links:</label></td>
  6.             <td id="links">
  7.                 <div name = "main" style="position:relative;">
  8.                 <div name ="en" style="position:absolute;">
  9.                     <input type="text" name="links" id="links" size="25" tabindex="19" />
  10.                     <input type="text" name="linkRef" id="linkRef" size="25" tabindex="20" value="http://"/>
  11.                     <input type="button" value="+" onclick="crearAn('links',0)" /><br/>
  12.                 </div>
  13.                 <div name ="es" style="position:relative;">
  14.                     <input type="text" name="links" id="links" size="25" tabindex="19" />
  15.                     <input type="text" name="linkRef" id="linkRef" size="25" tabindex="20" value="http://"/>
  16.                     <input type="button" value="+" onclick="crearAn('links',1)" /><br/>
  17.                 </div>
  18.                 </div>
  19.             </td></tr></table>
  20.         </fieldset>
  21.         </td>
  22. ...
  23.  
I used radio bottons to select <div en> or <div es> and the javascript is that:
Expand|Select|Wrap|Line Numbers
  1. function crearAn(obj,child) {
  2.           num++;
  3.           fi = document.getElementById(obj);
  4.           //fi.appendChild(document.createElement('br'));
  5.           ele = document.createElement('input');
  6.           ele.type = 'text'; 
  7.           ele.name = obj;
  8.           ele.id = obj+num;
  9.           ele.size = '25';
  10.           fi.childNodes[0].childNodes[child].appendChild(ele);
  11.           if (obj =="links"){
  12.             ele = document.createElement('input');
  13.             ele.type = 'text'; 
  14.             ele.name = "linkRef";
  15.             ele.id = "linkRef"+num;
  16.             ele.size = '25';
  17.             ele.value = 'http://';
  18.             fi.childNodes[0].childNodes[child].appendChild(ele);
  19.             fi.childNodes[0].childNodes[child].appendChild(document.createElement('br'));
  20.           }
  21.           else fi.childNodes[0].childNodes[child].appendChild(document.createElement('br'));
  22.         }
  23.  
I want to see only one div at time. so, only <div en> or <div es>. Well I have achieved it with the style of the div tags, but... if i add more than one input text element in <div en>, the fieldset doesn't make bigger.

"Lo siento mi inglés, me gustaría dobreexponer un div encima del otro. De la forma en que lo he escrito lo sobreexpone bien, pero el fieldset no sé agranda en el caso del <div en> ya que su position es absolute, si fuera relative estaría bien pero en ese caso no se sobreexpondrían. No sé si me he explicado bien"

Thanks
May 13 '06 #1
0 1741

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: murali | last post by:
Hello everyone, I used absolute positioning with div tag in my website. The page looks cool as long as someone doesn't try to zoom in by increasing the text size (ctrl++ or thru changing font...
4
by: Jane Withnolastname | last post by:
I am trying to re-work an old site by replacing the html with css. On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here:...
1
by: Chris McGarry | last post by:
Hello, I'm new to style sheets and have been fighting with browser compatibility for two days. I'm developing a image selection page (similar to Ebay where the visitor can select and enlarge 1-6...
1
by: Jeff Blume | last post by:
i have a dynamic menu that shoots out horizontal submenus when graphics on the left are rolled over. i'm using <div> layers and manipulating their visibility properties to do this. the problem...
17
by: George Hester | last post by:
http://tinyurl.com/5uj6w The lower middle icon the "block" should not drop down when the mouse is over it. How can I stop that? Also the navigation divs both top and bottom should follow the...
6
by: | last post by:
I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an...
4
by: Richard | last post by:
Hi, I like a demo on layers posted at http://www.echoecho.com/csslayers.htm. It displays two text phrases in separate layers visually overlapped, first with one on top and the other beneath,...
4
by: Cachorro | last post by:
Hi all!!! Im new to this news, but i think i will post quite a lot :) My problem is i got 1 big pic divided in 2 smallers 1.1 and 1.2. big one <- this one is the 1.1 |______] <- this one...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
0
by: sknonline | last post by:
Greetings. I am having troubles using absolute positioning in IE6. When I establish the width as 100%, it's not spanning the entire width of the browser. It works in Firefox, Safari, and IE7.......
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.