Click to See Complete Forum and Search --> : [RESOLVED] pop up css - position absolute?


alexthecatta
06-02-2008, 04:57 PM
hi guys,

I have a problem with CSS pop up.
This is my problem (http://www.cattaneoalessandro.com/proLoco/default.html), this is the Meyer page (http://meyerweb.com/eric/css/edge/popups/demo.html) I used as tutorial.

In my page, if you go over the link in the left side of the page, the text inside the <span> appers close to the link. I want the spam to apper at the bottom of the four links.

Meyer is usegin position absolute, but his links are placed against the left side of the window browser, while mines are in a DIV.

Hopwe it's clear, what is my problem. This is the CSS file (http://www.cattaneoalessandro.com/proLoco/css/base.css).

Can u please help me?
thanks in advance.
Ale

Centauri
06-02-2008, 06:29 PM
You place the popup absolutely, but relative to the div by giving the div relative position. The popup is then placed relative to the top left corner of the div. Rather than use display:none to hide the span (which will then not be read by screen readers), shifting the span into view works better :#links {
height: 700px;
font: 16px Verdana, sans-serif;
z-index: 100;
position: relative;
}

#links a span {
position: absolute;
width:190px;
padding: 5px;
color: #AAA;
background: black;
font: 10px Verdana, sans-serif;
text-align: center;
top: 14.5em;
left: -999em;
}

#links a:hover span {
left: 0;
z-index: 100;
}

alexthecatta
06-07-2008, 07:21 PM
thanks Centauri for ur answer.

Situation is a bit better...but still not OK.

Span still moves and I missed the format for the links.

Here (http://www.cattaneoalessandro.com/proLoco/Copia_di_default.html)is the new page, and
here (http://www.cattaneoalessandro.com/proLoco/css/Copia%20di%20base.css) is the new CSS.

thanks in advance.
A.

Centauri
06-08-2008, 12:07 AM
The block of css for #links you have as #links a - remove the a from the selector :#links {
height: 700px;
font: 16px Verdana, sans-serif;
z-index: 100;
position: relative;
}

alexthecatta
06-08-2008, 07:18 AM
Thanks a lot Centauri, now it works perfectly.
No I style the links... hope to don't destroy everything :)
ciao