The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
I am trying to recreate the same sort of effect that Tycho uses in his news posts, where he puts the lyrics to a song at the end of his signature which display the artist and song title when you mouseover the lyrics. Anyone know how to do this in HTML?
I'm not sure what specific effect you're looking for, but you can add a tooltip to nearly any HTML element by adding a 'title' attribute to it. If you want something fancier, I'm sure there are dozens of Javascript libraries/routines that will give you a similar effect.
admanbunionize your workplaceSeattle, WARegistered Userregular
edited February 2011
You know you can view the source of any web site, right? :P
It's an anchor tag (normally used for links) which creates the hover color change, and a title attribute which creates the mouseover effect. It's not at all fancy.
This is the code:
<a title="Andrew Lloyd Weber & Tim Rice - Pilate's Dream"><em>the haunting, hunted kind</em></a>
You know you can view the source of any web site, right? :P
It's an anchor tag (normally used for links) which creates the hover color change, and a title attribute which creates the mouseover effect. It's not at all fancy.
This is the code:
<a title="Andrew Lloyd Weber & Tim Rice - Pilate's Dream"><em>the haunting, hunted kind</em></a>
The title attribute doesn't have to be on anchors
Seguer on
0
admanbunionize your workplaceSeattle, WARegistered Userregular
Also, despite what admanb would have you believe, if you're interested in looking at html from the browser, you could download a web debugger (i use firebug, for firefox), or use a built-in browser one (i think chrome has one) to "inspect" html elements, which will basically tell you how to code what you're pointing your mouse at.
Not that this guy would ever admit that to you.
Rend on
0
admanbunionize your workplaceSeattle, WARegistered Userregular
Look maybe you get your jollies telling people incorrect things about web code, but this is a thread where we actually give people the truth.
And the truth is, in this case, it sounds like the OP is interested in coding websites in general. Using a web debugger and viewing manageable snippets of both source code and additionally encapsulated styles and even being able to edit HTML on the fly on external websites and having it render immediately in your browser so you can see what's going on when you change certain things is something he probably needs. And since he's asking this question, I'm assuming he either doesn't have those tools, or doesn't realize he doesn't have them.
Also, despite what admanb would have you believe, if you're interested in looking at html from the browser, you could download a web debugger (i use firebug, for firefox), or use a built-in browser one (i think chrome has one) to "inspect" html elements, which will basically tell you how to code what you're pointing your mouse at.
Not that this guy would ever admit that to you.
He actually didn't say that. I read his first post as pointing out what Penny Arcade was doing -- since that's what the OP asked. And the example the OP was asking about was an anchor tag with a title. He didn't say it only worked on anchor tags.
And he specifically pointed out that you can view the source of the page. While using a debugger to inspect code is likely better in the long run, admanb suggested the simpler alternative that is built into any browser of looking at the page's source.
He actually didn't say that. I read his first post as pointing out what Penny Arcade was doing -- since that's what the OP asked. And the example the OP was asking about was an anchor tag with a title. He didn't say it only worked on anchor tags.
And he specifically pointed out that you can view the source of the page. While using a debugger to inspect code is likely better in the long run, admanb suggested the simpler alternative that is built into any browser of looking at the page's source.
Seguerof the VoidSydney, AustraliaRegistered Userregular
edited February 2011
Whoa I didn't mean to start anything guys.
I just wanted to point out that the title attribute is not limited to anchors, as there are other useful options for it as well (probably most notably on img tags, alongside alt attributes)
Posts
<a href="http://www.example.com" title="This text will appear on mouseover in many modern browsers">Link Text</a>
Play with me on Steam
It's an anchor tag (normally used for links) which creates the hover color change, and a title attribute which creates the mouseover effect. It's not at all fancy.
This is the code:
Also, despite what admanb would have you believe, if you're interested in looking at html from the browser, you could download a web debugger (i use firebug, for firefox), or use a built-in browser one (i think chrome has one) to "inspect" html elements, which will basically tell you how to code what you're pointing your mouse at.
Not that this guy would ever admit that to you.
Look maybe you get your jollies telling people incorrect things about web code, but this is a thread where we actually give people the truth.
And the truth is, in this case, it sounds like the OP is interested in coding websites in general. Using a web debugger and viewing manageable snippets of both source code and additionally encapsulated styles and even being able to edit HTML on the fly on external websites and having it render immediately in your browser so you can see what's going on when you change certain things is something he probably needs. And since he's asking this question, I'm assuming he either doesn't have those tools, or doesn't realize he doesn't have them.
He actually didn't say that. I read his first post as pointing out what Penny Arcade was doing -- since that's what the OP asked. And the example the OP was asking about was an anchor tag with a title. He didn't say it only worked on anchor tags.
And he specifically pointed out that you can view the source of the page. While using a debugger to inspect code is likely better in the long run, admanb suggested the simpler alternative that is built into any browser of looking at the page's source.
Sir, Rend is screwing with me for comic effect.
I just wanted to point out that the title attribute is not limited to anchors, as there are other useful options for it as well (probably most notably on img tags, alongside alt attributes)