monkeytooth Posted June 1, 2011 Share Posted June 1, 2011 Im trying to figure out the best means of approaching having dynamically created elements expand when hovered over. I know JS will have a hand in handling the effect but that I'm not to concerned about so much as having the CSS back it up so it all positions correctly after things are said and done. I want without having to hardcode dozens of elements and have them hidden until trigged have a tooltip like thing I know I could just go grab some canned code and plug it in, but thats not particularly my style. Whats the best way to approach having an element in a matter of speaking float above another element but offset a little bit? Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted June 3, 2011 Share Posted June 3, 2011 the 'best' way is not the right way to ask in my opinion. The best way is the right tool for the right moment. Doing something with pure css limits you in a way, but increases the user base. Using javasscript does the opposite. Just looking at the title of your question. I made A tooltip with just css. Have a look here I made something for a fellow phpfreak just a week ago. The code is pretty self explanatory. So read it carefully. Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted June 3, 2011 Author Share Posted June 3, 2011 Re-evaluating my original question I think I mis-conveyed what I am looking to do. All though I appreciate the example given, and that is indeed something I am intent on doing later with something else in a similar fashion. What I am looking to try to figure out currently what is the best way to have an element almost hover over a different element but offset position wise, without the position in css being fixed or absolute, and with that whats the best way to layout said elements... Mind you I will be handling some parts of this with JavaScript for the dynamic factors of it, but in order to do that I need to know via css whats the best way to do what im trying to do so I can then manipulate that part in JS. my weak attempt at a visual example: Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted June 3, 2011 Share Posted June 3, 2011 I hope i understand you right. But if you simple said, want elements to overlap each other you require a position other than static (which is the default) plus you need a z-index property. What that little blue circle does below i have no idea. I created an example, since z-indexes show up here pretty often. you can have a look here: http://cssfreakie.webege.com/phpfreaks/ has just been added. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.