Solved

Positioning a popup window

Posted on 2014-03-21
5
280 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
  • 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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
age from date of birth 4 41
MouseOver help for Intranet website 2 22
Change div area and length 1 26
Sort Order Icons on HTML Table 3 20
This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

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

17 Experts available now in Live!

Get 1:1 Help Now