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

  • Home
  • SEARCH
  • 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 160487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:02:37+00:00 2026-05-11T11:02:37+00:00

i can’t figure out what makes an html button element appear to be pushed

  • 0

i can’t figure out what makes an html button element appear to be pushed (right click an html button and then hover on and off to see what i mean).

the following two examples i’ve taken from other websites. the first has the typical button push effect. the second does not.

.button {  border:none 0;  background-color:Transparent; } .button .l { background:url('img.gif') no-repeat 0 0;  padding-left:7px; display:block;  height:32px; } .button .c { background:url('img.gif') repeat-x 0 0;  display:block;  height:32px;  padding-top:7px; } .button .r { background:url('img.gif') no-repeat right top;  padding-right:7px;  display:block;  height:32px; } 

and

.button { background:#F0F0F0 url(img.gif) repeat-x scroll 0 0; border:1px solid Black; color:#333333; font-size:12px; height:20px; padding-left:8px; padding-right:8px; } 

EDIT: @ mr skeet, i want a button that will look the same in all browsers (ie. background image) but still behave like a real html button with the push effect. am i correct in assuming that i’ll need javascript for this? and different css for the push state? an example/tutorial would be awesome

  • 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. 2026-05-11T11:02:38+00:00Added an answer on May 11, 2026 at 11:02 am

    Either use

    <input type='button' value='Click Me'/> 

    which will automatically act like a button, or use the :hover and :active CSS pseudo classes to get what you want…

    a.likeAButton {   background-color:#67a0cf;   border:1px outset #2683cf;   color:#fff;   padding:3px 3px 3px 3px;   margin:1px;   text-decoration:none; } a.likeAButton:hover {   background-color:#5788af;   border:1px outset #2683cf;   color:#fcffdf;   padding:3px 3px 3px 3px;   margin:1px;   text-decoration:none; } a.likeAButton:active {   background-color:#67b4cf;   border:1px inset #1d659f;   color:#e0ffaf;   padding:4px 2px 2px 4px;   margin:1px;   text-decoration:none; }   <a href='somepage.html' class='likeAButton'>Fake Button</a> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.