Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 transition for "top" and "left" properties not working

Tags:

I have a list with one item on the list transitioning to the northeast when I hover over it. Using margin-top and margin-left property transitions worked but the item being hovered over kept pushing other elements so I added position:relative and tried using top and left transition properties but it didn't seem to be working.

Here is the jsfiddle:

list hover

like image 682
user701510 Avatar asked Nov 13 '11 02:11

user701510


3 Answers

Add left, top default link demo

left: 0px
like image 199
nghiepit Avatar answered Sep 22 '22 03:09

nghiepit


Have you tried setting the parent of your list. I know sometimes relative has issue unless the underlying item is also relative or absolute. Just a thought.

like image 36
uadrive Avatar answered Sep 22 '22 03:09

uadrive


Use position:absolute and it will take it out of the normal document flow. You could also give it z-index:5 to make sure it floats over other elements.

like image 1
COBOLdinosaur Avatar answered Sep 25 '22 03:09

COBOLdinosaur