Solved

Positioning a popup window

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

708 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

14 Experts available now in Live!

Get 1:1 Help Now