Make div appear at top of parent


If I was to click a button in #three, I can change the class of the div through .net so if this is the case can I make #two appear at the top of the child list, even though it’s not physically there.

Thanks in advance.

Why would you want number #2 to go to the top when you click #3?

I’m not quite sure what you are asking exactly. What do you want to happen to the rest of the list when this item is moved.?

You could change the class on the clicked item so that that element only becomes absolute and gets placed on top of the whole list - assuming there was some free space above it.

In essence all you can do is move one item and it would mean that items would need to have a fixed height so that you could work out how much space to allocate.

I may be misunderstanding what you want though :slight_smile:

If you are asking how to influence other elements heights upon container 3 being at the top of the list, then no, that is behavior and as such Javascript should be used :).

If that’s the case, then head over to the JS forum.

If not, then disregard (it’s slightly hard to understand you :))


Didn’t refresh old tab…bah…went to cube some…sorry

Sorry, I edited your post in error (done that twice today and never done that before :().

If all the list items were a set height you could add a class to two elements and make them change place by working out the distance between and placing them absolutely into that space. It won’t reflow the other elements though.

I’m not sure how this could be useful exactly so I may be missing the point. Sounds like something for Javascript if you want to dynamically change elements on the fly.

Sorry, bad with numbers.

What essenitally i’m saying is can would make a list order differently by applying a class to it. The div would be an unknow height if container 3 was at the top of the list instead of its natural third position, the resr would need to wrap in beneath it.