Jump to content

Tool Tip


monkeytooth

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

example.png

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.