Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:12:08+00:00 2026-06-09T21:12:08+00:00

An interface of control-buttnos is released on default browser’s styles. I try to use

  • 0

An interface of control-buttnos is released on default browser’s styles. I try to use standart buttons () with images as values

HTML:

<div id="control-play" class="button"><span></span><input type="button" value=""/></div>

CSS:

#control-play span {background-image: url('../i/ruler/play.png'); margin: 16px 0 0 18px; position: absolute; width: 16px; height: 16px;}

But of course I get a problem with :hover event when the cursor’s hovering an image:

Situation

In JS I can activate click by catching images’s onClick:

$('#control-play span').click(function(){$(this).parent().find('input').click();})

But I can’t do that for onHover event.

As you can see, I don’t imitate :hover {} and :active() styles, I use default ones. I could grab images and use them as backgrounds but it doesn’t seem a good-style trick.

So, colleagues, any ideas? Any of jQuery, CSS3 or HTML5 are welcome.

UPD: I mentioned it carefully, nevertheless most of answers suggest toggling whole background of the button. Note: I use buttons with browser’s styles, I just try to use 16×16 icons instead of text labels.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:12:09+00:00Added an answer on June 9, 2026 at 9:12 pm

    The most suitable answer is in using HTML5 <button>...</button> instead of <input type=button value=""/>

    HTML:

    <button type="button" id="control-play" title="Play"><span></span></button>
    

    CSS:

    button#control-play {width: 50px; height: 49px;}
    button#control-play span {display: inline-block; background: url('../i/ruler/play.png') no-repeat;}
    

    There’s no need in sprites, 3 backgrounds for imitation standart browser opportunities for buttons. Everyone will use these buttons in its favorite style (even using skin for a browser), and only my icons will be permanent.

    Via Pointy‘s comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use the WebBrowser control as a UI interface in C#?
I'm creating an interface control in an iPhone app where views are positioned in
When you have a domain object that needs to display as an interface control,
I have an Asp.Net 4.0 website/control interface that uses an update panel and some
When I bind a control to an NSArrayController using Interface Builder, there are a
I am working on implementing an ISrollInfo interface for a custom control. Simply put,
We've been using CVS (with TortoiseCVS interface) for years for both source control and
hey all my question about how the developers makes their interface the buttons, slider,
IBOutlets are for buttons, labels, images, slider, pickerview and all other controls we drag
Question I have video player chrome buttons designed with HTML/CSS. The full screen button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.