WordPress.org

Ready to get started?Download WordPress

Forums

CSS & Java:hover images (5 posts)

  1. dss
    Member
    Posted 9 years ago #

    I wrote up a post on my progress so far in trying to find a way to use div and css to include images with hover states in the design and the post body of WP.
    here's a link to the article
    I'm wondering if this is useful to anyone, but more importantly, i am wondering if anyone has found a solution they would share which accomplishes this task without java calling.
    Seems the only way i've fond to get this done is using javascript's onmouseover=, onmouseout= and onclick= properties.
    it'd be so cool to be able to do this in a post.
    but for now, simply writing up css to do it is either not functional, or i am confused about where to put my a:links and my a:hovers in a multi class call.
    anyone interested?
    wanna help?
    f.

  2. dss
    Member
    Posted 9 years ago #

    Man-o-man...
    do i have a knack for choosing the unfriendly topics of what?
    /me pouts quietly and then pulls himself together.

  3. Anonymous
    Unregistered
    Posted 9 years ago #

  4. dss
    Member
    Posted 9 years ago #

    .tabs {
    text-align: right;
    font-size: 16px;
    margin-right: 185px;
    margin-bottom: 5px;
    }
    a.tab, a.tab:link, a.tab:visited {
    background: #666666;
    border: 1px solid #FFFFFF;
    padding: 5px 1em 5px 1em;
    text-decoration: none;
    border-bottom-width: 0px;
    }
    a.tab:hover {
    background: #999999;
    color: #FFFFFF;
    }
    a.tab.activeTab, a.tab.activeTab:hover, a.tab.activeTab:visited {
    padding: 6px 1em 5px 1em;
    background: #000000;
    border: 1px solid #FFFFFF;
    border-bottom-width: 0px;
    text-decoration: none;
    position: relative;
    top: 1px;
    }

    So (takes a deep breath cause he knows this is a stupid question) why then, as i am taking almost all of my instruction from the example CSS in WP, would you choose a class like
    #class
    over
    .class
    and how do you know the difference?
    for example, when a class has a link
    #class a:link
    it doesn't seem to work. but the class does.
    from your example i see you use
    a.class a.class.hover a.class.active
    so is what i am doing (and how the calendar in the default WP css wrong?

  5. dss
    Member
    Posted 9 years ago #

    Ok, i solved this issue of hover states for div image backgrounds if anyone's interested.
    http://fernando.dubtribe.com/archives/2004/09/16/css-hover-images-revisited/
    hope it helps some future wheel carver like myself.
    f.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.