문제

I am sorry if this is really a newbie question - or if it is very simple...

I am trying to make a very basic image tooltip based only on CSS ( no JS ).

Fiddle here :http://jsfiddle.net/ufs44/1/

My problem is how to distance the image from the link in order for it not to obscure the text.

I really would like to make it with only CSS (later I will add some transitions) But right now, the tooltip is always hiding the other links below.

Doing position:relative actually makes the whole page "jump" because it is changing from display:none to display:block and the space is missing for the element...

I would like to know how I can make the tooltip to appear ABOVE the link for example, or to the side...

도움이 되었습니까?

해결책

You need to use position: relative; within the link itself, and then position the image tooltip absolutely.

Fiddle

다른 팁

how to distance the image from the link in order for it not to obscure the text .

Elements with css position:absolute are positioned using css left , right, bottom, top

As the comment - http://jsfiddle.net/5W5bB/1 - using left

left:200px;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top