SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru biggazillakilla's Avatar
    Join Date
    Aug 2003
    Location
    San Francisco USA
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question "cursor:help" help! Where to add code in stylesheet?

    I'm trying to make tooltips with CSS and the title attribute, like this:

    HTML Code:
    <span class="define" title="GMAT Critical Reasoning">CR</span>
    And in my stylesheet, I have something like this:
    HTML Code:
    .define span{
     	border-bottom :1px dashed #000;
     	font: bold 1.2em Verdana, Geneva, Arial, Helvetica, sans-serif;
     	cursor: help;
     	}
    And I've been reading that I need to add this somewhere in my stylesheet:
    HTML Code:
    a.help {cursor: help; }
    But the cursor is not showing up.

    I've tried many different combinations (it's almost three a.m. here!), but nothing's working.

    For what it's worth, I also added:

    HTML Code:
    abbr, acronym {
     	border-bottom: 1px dotted #000;
     	cursor: help;
     }
    And that's working fine.

    Sorry for the newbie question.

  2. #2
    SitePoint Enthusiast Gridlight's Avatar
    Join Date
    Apr 2005
    Location
    Oxford, UK
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your first example won't work, because your telling the css to appy it's sytle to all span elements that occur inside all elements with the class 'define', not the 'define' class it'self.
    Use '.define {xxx;}' by itseld, without the 'span'.

    Your second example is meaningless in this context. That rule will apply the styles to all 'a' elements with class name of 'help', AFAIK.

    abbr, acronym declarations will style those elements accordingly, and I can't see what it has to do with your current problem, as you're not using either in the example you've given.

    Anyway, to use the correct semantics, your '<span class="define" etc...' SHOULD be an acronym tag, not a span tag, as 'span' does not have any inherant meaning, and 'acronym' does.

    Hope thats helpful
    Cheers,
    Gridlight

    BrowserCam for 30?! I'm in, are you?

  3. #3
    SitePoint Guru biggazillakilla's Avatar
    Join Date
    Aug 2003
    Location
    San Francisco USA
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That did the trick. And thanks a million for the extra info, Gridlight. It's helpful.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •