How to give the appearance of a button with a <div>?

Posted by user246114 on Stack Overflow See other posts from Stack Overflow or by user246114
Published on 2010-06-01T19:57:34Z Indexed on 2010/06/01 20:03 UTC
Read the original article Hit count: 164

Filed under:
|

Hi,

I'm looking at the buttons used on twitter's home page, specifically the big orange 'signup' button. I see it is defined like this:

<p id="signup-btn">
    <a id="signup_submit" href="/signup">
        <span>Sign Up</span>
    </a>
</p>

are they just using css to give the orange button appearance (which may just be a jpg), and also using css to specify the roll-over appearance (another jpg), and finally a third state for mouse-click (another jpg) to give the impression of a real clickable button?

If that's how it works, what should I look for to do the same thing? In my case I just want to make a button I guess, like:

<div class='mybutton'>Hello!</div>
.mybutton {
   bgcolor: red;
   bgcolor-mouseover: yellow;
   bgcolor-mousedown: green;
}

yeah something like that would be great,

Thanks

© Stack Overflow or respective owner

Related posts about html

Related posts about css