Solved

DIV overlapping... *calendar pop up*

Posted on 2001-08-07
10
813 Views
Last Modified: 2013-11-28
I have a div style calendar popup, and up to now had no problems with it... ... UNTIL I had something under the place where the calendar pops up.  It has transparent background @.@ I've tried changing the CSS of it, the DIV and everything... I hope someone here could tell me how to make it non transparent =o)

meaning I can see the underlying text on the calendar div section... it's annoying >.<

The script doesn't really matter that much.
I believe it's just a property of the DIV the Calendar uses "Div" and "Div2" respectavely that isn't set right...



code for page is:

<html>
<head>
<!-- POPUP CALENDAR SUPPORT STARTS -->
<link rel="stylesheet" type="text/css" href="calendar.css">
<script src="calendarControl.js"></script>
<script src="calendarPopup.js"></script>
<script src="anchorPosition.js"></script>
<script src="popupWindow.js"></script>
<!-- POPUP CALENDAR SUPPORT ENDS -->
</head>
<body>

Date Picker example:

<!-- DIV used by calendar popup control-->
<div id="calendarDiv" class="calendar" style="position: absolute;" align=center></div>
<div id="calendarDiv2" class="calendar" style="position: absolute;" align=center ></div>

<table width="100%">
     <tr><td>Name:</td><td><input type="text" name="firstname"></td></tr>
     <tr><td>Surname:</td><td><input type="text" name="surname"></td></tr>
     <tr>
          <td>Date:</td>
          <td>
               <input type="text" name="date" disabled></input>
                <!-- Calendar will position on ANCHOR element-->              
                <a id="calendarAnchor"/>&nbsp;</a> <!-- MUST NOT BE EMPTY -->
               <button onclick="showCalendar('calendar1');">
               <img src="calendar.gif"><br>
          </td>
          <td>
               <input type="text" name="date2" disabled></INPUT>              
               <a id="calendarAnchor2"/>&nbsp;</a> <!-- MUST NOT BE EMPTY -->
               <button onclick="showCalendar('calendar2');">
               <img src="calendar.gif">
               </button>
          </td>
     </tr>
     <tr>
          <td colspan=3>
               <input></input><br><input></input>
               <input></input><BR><input></input>
               <input></input><!--just stuff to demonstrate the 'transparency mess up'-->
          </td>
     </tr>

</table>

<script language="JavaScript">

// Initiate calendars
createPopupCalendar("calendar1", "date", "calendarDiv", "calendarAnchor");
createPopupCalendar("calendar2", "date2", "calendarDiv2", "calendarAnchor2");
</script>

</body>
</html>



Well hope you can help :)

~Ixeus
0
Comment
Question by:The_Brain
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6359369
Give the div a background color. Or even easier, give the table in the div a background color. It can be white.
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6359732
tried that @.@
didn't turn out as simple as that
0
 
LVL 2

Expert Comment

by:TenTonJim
ID: 6359904
Try changing the z-index property for the overlapping divs, placing one behind the other, and using a background color...


The one you want behind (underneath so to speak) set to

.div2
{
z-index:-1;
}

and then try setting a background-color property in div1 as webwoman suggested.

.div1
{
background-color: #FFFFFF;
}

Jim s.

0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:dij8
ID: 6360354
If the background color doesn't work you could try a background image.  Say a 1x1 pixel colored image (about 64bytes in weight).  And then resize it to fit the DIV.
0
 
LVL 19

Accepted Solution

by:
webwoman earned 150 total points
ID: 6361249
You tried this?

<table width="100%" bgcolor="#FFFFFF">

and it didn't work? I find that very hard to believe...
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6363017
Well you see,

The whole page is fine, the CALENDAR pop up, is the problem. Sure the colour of the table works.  But the problem isn't that.  The calender's background is transparent, it has absolute position, (i.e. at the place where the edit box is).  And anything under the calendar... well shows up... I've edited tweaked everything about the calendar's div section, I could change part of the background (the text background which worked, but the most of it was still transparent) the selection and the headings, but it still had a generic background was still transparent.

 So nothing I do to the underlying Form, it's the calendar DIV that has a transparency background that wouldn't go away... =/

 Sorry if this is confusing, but I do html all day, and know the stuff, and this one really has me stumped >.<

 I'm probably overlooking something very stupid... but it's not those suggested things :(

(I'll try the last 2 after I get the calendar's machine online)


~Ixeus

0
 
LVL 19

Expert Comment

by:webwoman
ID: 6364764
FORM? If you've got a form under the popup, it's NOT going to go away, never is going to go away, and nothing you do to the div will hide it. Forms are ALWAYS on top. The only way you can have it not be on top is to surround that with a div and hide the entire form when you show the calendar.

Nothing else will do it.

If you had said that before, it would have made this a lot faster...
0
 
LVL 10

Expert Comment

by:dij8
ID: 6365342
And why will the form always be on top? Because they have a z-index of infinity.  And you can not change it.

If you do put the form in a div then you have to put the WHOLE form in the div and hide the WHOLE form because if you put some of it in a div (or any other form of layer) then in Netscape it will be separated from teh rest of the form.
0
 
LVL 1

Author Comment

by:The_Brain
ID: 6383775
Even though you didn't exactly give me the right answer in this case, you inspired me to look into more backgrounds,, I decided to rewrite this HUGE page into stylesheets and I style sheeted the calender and gave properties to TR of calendar and it works now :)
even with something like form under it.

Thx for the inspiration ;)

~Ixeus

(sorry no A, you didnt' provide an "Exellent!!!" answer :p)
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6384127
No problem... glad you got it to work!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pass form variable from one web form to another 2 29
Joomla 2.5 shopping cart 7 30
Button and js nou working 3 20
Ouput in html in powershell 2 21
A great marketing strategy is diverse.  Read about the not so popular, yet effective, marketing tactics you can start using today!
Online promotion is consistently becoming more important for all types of businesses. From Facebook ads to search engines to YouTube videos, there are all sorts of channels that can effectively be used to promote a business or product. But how shoul…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

830 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