Solved

How to put Layers above windowed elements (such as form's fields)

Posted on 1998-10-06
6
146 Views
Last Modified: 2010-04-09
I'd like to know if there's a way to avoid your Layers form being covered by the form's fields (texboxes, checkboxes, and else) and other windowed elements...
0
Comment
Question by:leota
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:jbrugman
ID: 1838448
Depends on the brouwser you are using. With nn4, use z-index, to place layers on top or below, and don't forget to set the transparency. For IE4 i don't know yet, i'm still learning this part, but it would be an option to set the underlaying layers visibility to hidden.
0
 

Author Comment

by:leota
ID: 1838449
Well, I understand the z-index stuff, but it doesn't work with windowed elements (like form's fields or applets) if any one can look at this html example:

<html>
<head>
<title>Layers under form's field</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body><script language="JavaScript"><!--
function ShowHide() {
      if(document.layers["top_layer"].visibility == "show")
        document.layers["top_layer"].visibility = "hide";
      else document.layers["top_layer"].visibility = "show";
}
--></script>

<layer name="top_layer" z-index="1" top="100" bgcolor="#0000ff">

<p align="center"><font color="#ffffff"><big>That's my hidden layer, if you get a look at it you'll see that it
is actually on top of the other one but even though it's on top, the form's fields are
still on top of it.</big></p>
</layer>
<layer name="main" z-index="0">

<table border="5" width="410" cellspacing="0" cellpadding="0" bgcolor="#D76B00">
  <tr>
    <td width="408" align="center"><font face="Arial" size="3" color="#FFFFFF"><b>I - Forms
    Fields and Layers Test</b></font></td>
  </tr>
</table>

<form>
  <table border="0" width="100%">
    <tr>
      <td width="100%" colspan="2"><font face="Arial">Field One:</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font color="#000000" face="Arial"><input type="text"
      size="20" name="cpf_especialista_text" tabindex="1"></font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font face="Arial">Field Two:</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font color="#000000" face="Arial"><input type="text"
      size="43" maxlength="99" name="nome_especialista" tabindex="2"></font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font color="#000000" face="Arial">Field Three:</font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font face="Arial"><select name="area_atuacao" size="1"
      tabindex="3">
        <option value="0">Option1</option>
        <option value="1">Optino2</option>
        <option value="2">Optino3</option>
        </select></font></td>
    </tr>
    <tr>
      <td width="100%" colspan="2"><font color="#000000" face="Arial">Field Four:</font></td>
    </tr>
    <tr>
      <td width="50%"><font face="Arial"><textarea rows="2" name="capacitacao_complementar"
      cols="37" wrap="hard" tabindex="4"></textarea></font></td>
      <td width="50%"><div align="center"><center><p><input type="button"
      value="Show/Hide Layer" name="button" onClick="ShowHide();"></td>
    </tr>
  </table>
</form>
</layer>
</body>
</html>

Don't worry about the page or HTML itself just look at what happens when you have a layer and a form... and if any one have the answer to avoid this bizarre behavior... I'd be glad.
0
 
LVL 4

Expert Comment

by:jbrugman
ID: 1838450
If you want to move or use a windowed element in a layer, in NN, yes, it goes wrong, i think it's a bug.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:leota
ID: 1838451
Adjusted points to 100
0
 

Author Comment

by:leota
ID: 1838452
Adjusted points to 150
0
 
LVL 2

Accepted Solution

by:
jedimike earned 150 total points
ID: 1838453
declare a Style sheet;;;;;
<style text="text/css">
   .me (position: absolute; left: XXpx; top: XXpx}
</style>

now you can say that your layer belongs to that class (.me) and the layer will move to those coordinates and disregard any other elements in the page.  It you said "position: relative", it would be placed around the other objects.....so....

<layer id="somelayer" class="me" ......>
Up to here will work fine

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
html5 auto send email 7 26
How to Left-Align Navigation bar? 4 26
Centered Image 2 27
ASP server side get value 15 18
This article discusses how to create an extensible mechanism for linked drop downs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now