+ Reply to Thread
Results 1 to 6 of 6

Thread: Hover for information display. || CSS

  1. #1
    Savoir-Faire is offline x10Hosting Member Savoir-Faire is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    1

    Hover for information display. || CSS

    I've been working with CSS for quite a while now, and I saw, recently, an effect that I really want to learn.
    http://vampirefreaks.com/cult/nco <--- That, right there is a link to what I saw.
    If you roll your mouse over one of the words in the layout, it displays information that pertains to that word.
    I've seen attempts at this in my research for attempting to learn, but all of the sites I've found show you how to do it, however, when your cursor leaves the word, the text and box disappear.
    In the example above, you can hover over the box, and it doesn't disappear until you hover outside of it.
    I tried pagesourcing, but her coding is written incorrectly, and to be honest, sifting through it was starting to give me a migraine. (I'm a sucker for properly written code and anything else just irritates me to no end.)
    If someone could offer up some help of any sort, that would be great.
    Even a link to a tutorial that actually shows what I'm asking for would be greatly appreciated.

  2. #2
    essellar's Avatar
    essellar is online now Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: Hover for information display. || CSS

    The code is written quite correctly -- well, except that the cursor is getting set to a resize in a non-resizable area, which is an unforgivable UI sin. Is your problem with the page that not all of it is pretty-printed? Get used to it -- whitespace is insignificant, and just adds to page size. I would have minified the CSS a lot further, made the CSS a single, separate file and gzipped it to reduce the download time. You can, in any decent text editor (that is, in just about anything but Notepad) use regular expressions to add line breaks and indents. Some even have a "pretty print" function built-in. I remember Firefox having a pretty-printed view source extension at one time -- it may be part of the Web Developer Toolbar.

    In any case, the hover and link/visited states for the links are different sizes. Link and visited are smaller, with the overflow set to hidden. When you hover, the link gets larger, the stuff that was hidden gets displayed, and you have to move your mouse completely out of the now-larger anchor to leave the hover state.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Hover for information display. || CSS

    Quote Originally Posted by essellar View Post
    The code is written quite correctly
    Not so much. And tables for layout? Honestly.

    As for the effect, pure CSS menus and Suckerfish menus are a better illustration.
    Last edited by misson; 04-23-2010 at 05:28 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #4
    essellar's Avatar
    essellar is online now Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: Hover for information display. || CSS

    If you take a good look at the page, rather than just run it through a validator, you'll see that it's backwards-compatible to both IE5 and Netscape 4.7. Having spent a significant amount of time having to support NS4.x (it still had a significant share as late as 2005 among our users, and for a financial services company it doesn't pay to tell people watching their pensions to upgrade or die) I can tell you that the site is about as good as it gets (and that it degrades gracefully). And yes, tables for layout is wrong from a web standards point of view, but sometimes one needs to consider the customer base (and the age of the site).
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  5. #5
    Teensweb is offline x10 Lieutenant Teensweb is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    352

    Re: Hover for information display. || CSS

    It won't be very hard if you are not too new to js and/or css.
    Not so much. And tables for layout? Honestly.
    BTW, that was a mess of a page, 99% of the pages I have in my site are totally error free!
    Last edited by Teensweb; 04-24-2010 at 05:45 AM.

  6. #6
    n.urked is offline x10Hosting Member n.urked is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    2
    http://docs.jquery.com/UI/Dialog

    This can solve all your problems

+ Reply to Thread

Similar Threads

  1. How to make realistic hover with js?
    By Teensweb in forum Programming Help
    Replies: 0
    Last Post: 08-25-2008, 03:16 AM
  2. How to make realistic hover with js?
    By Teensweb in forum Programming Help
    Replies: 0
    Last Post: 08-25-2008, 03:15 AM
  3. html/css for a text hover box
    By buddy218 in forum Programming Help
    Replies: 7
    Last Post: 08-09-2008, 04:24 AM
  4. [ayuda] Css Hover
    By medina in forum General
    Replies: 11
    Last Post: 04-27-2007, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers