dcsimg
www.webdeveloper.com
Results 1 to 7 of 7

Thread: best strategy for this roll-over?, 2 elements, see attached .gif

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    best strategy for this roll-over?, 2 elements, see attached .gif

    just thought it'd be a good idea to run this by this group.

    what's the best strategy to use for programming a rollover, without using javascript or jQuery?

    the way i have it now is not good enough. here's what happens:
    the mouse enters the LI area and the star fades in (incorrectly, see below) but the text color does not change, so it looks out of sync. the text only changes when the mouse is right on top of it.

    the star is set as a the List Element's background image, only for a hover state. i set to easing so what happens is it animates to the background position offset. ugg...

    i could do with jQuery but would prefer just to use CSS. any ideas?

    what i'd like is (predictably) the star to fade in simultaneous to the text changing color. this should happen as soon as the mouse enters the LI area.

    feedback would be greatly appreciated!, thanks
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2012
    Posts
    11
    Could you use z-index and make the image hide behind then when hover it comes above the image?

    Something like?

    a {
    position:relative; z-index:1;
    }

    a:hover {
    z-index:1000 /* doesn't have to be 1000 just waah ever... */
    }

  3. #3
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,478
    Hi there toptomato,

    check out the attachment to see a possible solution.



    coothead
    Attached Files Attached Files
    Last edited by coothead; 10-31-2012 at 09:45 AM. Reason: "Senior Moment" !!!

  4. #4
    Join Date
    Mar 2010
    Posts
    281
    wow, thanks guys. thanks for taking the time to help with my post. appreciate it

  5. #5
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,478
    No problem, you're very welcome.


    coothead

  6. #6
    Join Date
    Mar 2010
    Posts
    281
    coothead i went to send you a personal message but couldn't

  7. #7
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,478
    Hi there toptomato,

    I disabled that facility for various reasons.

    One of those reasons being that I was getting requests
    to help solve problems outside the forum boards.

    coothead

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles