Solved

Positioning a popup window

Posted on 2014-03-21
5
285 Views
Last Modified: 2014-04-12
I'm working on an online reservation system at www.mauitradewinds.com/Test/availability.html    There is a form on that page, "Check Availability by Date", where dates can be entered by clicking a calendar icon.  The calendar should appear near the center of the page, but instead, it appears high up, possibly beyond the top of the screen.  How can I center that popup on the page?
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 15

Expert Comment

by:Insoftservice
ID: 39944854
Please provide screen shot as on my laptop its displayed just above the text field
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 250 total points
ID: 39945474
In calendar.css replace :
.calendar {
  position: relative;
  display: none;
  border-top: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  border-left: 2px solid #fff;
  font-size: 11px;
  color: #000;
  cursor: default;
  background: #c8d4d0;
  font-family: tahoma,verdana,sans-serif;
}

Open in new window


by (position from relative to absolute, adding left, top to 50% and margin(half dimension size for left and top) :
.calendar {
position: absolute;
left: 50%;
top: 50%;
margin: -115px 0 0 -100px;
  display: none;
  border-top: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  border-left: 2px solid #fff;
  font-size: 11px;
  color: #000;
  cursor: default;
  background: #c8d4d0;
  font-family: tahoma,verdana,sans-serif;
}

Open in new window

0
 

Author Comment

by:ddantes
ID: 39945915
Thank you.  I made those changes, but the issue persists.  I think it is related to styling and code changes I have made to the page which generates the calendar popup (av0001.html).  Here are screen shots of the popup location before and after I made those changes.  I used your modified calendar1.css in both cases.

Before changesAfter changes
0
 

Author Comment

by:ddantes
ID: 39946008
Please disregard my previous post.  My browser cache was still loading the previous calendar style sheet.  The css changes have resolved the issue -- thanks!
0
 

Author Comment

by:ddantes
ID: 39948238
There seems to be some issue with the position:absolute being rendered correctly by Internet Explorer.  Please see the new question:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_28411327.html
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

730 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