?
Solved

Positioning a popup window

Posted on 2014-03-21
5
Medium Priority
?
292 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 1000 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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

771 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