Solved

I need help with positioning a layer

Posted on 2004-04-27
7
135 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

809 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