Solved

I need help with positioning a layer

Posted on 2004-04-27
7
134 Views
Last Modified: 2010-04-09
I created a popup using an additional layer. Here is my stylesheet code:

<style type="text/css">
a.info{position: relative}
a.info:hover{background-color:#cff}
a.info span{display: none}
a.info:hover span{display:block;position:absolute;top:2em;left:0em; width:55em;
  border:1px solid #0cf; background-color:#cff; color:#000;text-align:left;text-decoration:none;font-size:14px}
</style>
 
The html portion that uses this is:

<a class="info" href="PCCOMMENTSINQ?SUBMIT=WHATEVER:'>Description<span>This is popup text for the description</span></a>

this work very well except I am dynamically creating this on the fly(the description and popup info) and I want the popup to be relative to the link or pointer vertically, but I want it to start at the left edge of the page horizontally. I probably need some javascript or something. Any recommendations?

Also depending on the pointer position, I may want to put the popup above my link.

Thanks, Troy
0
Comment
Question by:troyd1
  • 4
7 Comments
 
LVL 7

Expert Comment

by:mark-b
ID: 10930930
Is this what you are looking for:  Change one CSS def:

a.info:hover span{display:block;position:relative;top:0em;left:0em; width:55em;
  border:1px solid #0cf; background-color:#cff; color:#000;text-align:left;text-decoration:none;font-size:14px}

-Mark
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10931112
Or maybe this?  

a.info:hover span{display:inline;position:relative;left:1em;
  border:1px solid #0cf; background-color:#cff; color:#000;text-decoration:none;font-size:14px}

-Mark
0
 
LVL 7

Expert Comment

by:mark-b
ID: 10931379
Or maybe this?:

a.info{position: relative}
a.info:hover{display:inline;}
a.info span{display: none}
a.info:hover span{display:inline;position:relative;left:1em;
  border:1px solid #0cf; background-color:#cff; color:#000;text-align:left;text-decoration:none;font-size:14px}

(Ok, ok, I'll stop now).

-Mark
0
 
LVL 7

Accepted Solution

by:
mark-b earned 500 total points
ID: 10978333
Did any of these work for you?
0
 

Author Comment

by:troyd1
ID: 10987944
Sorry, I have not had time to test these. I had to go with what I had. I will try to test this soon and let you know. Again to reiterate, I want the assign a static horzontal reference, but I want to position vertically based on the pointer/link position. This will pretty much take care of my problem although I would like it to pop up above the link position if it is at the bottom of the page.

Thanks, Troy
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

911 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

16 Experts available now in Live!

Get 1:1 Help Now