tags:

views:

70

answers:

4

Could anyone show me some tutorials that make a button in css and doesn't require images? I googled it but everything involved images...

Thanks!

+3  A: 

Um, define "button"? If you just want a basic button, you don't even need CSS, just use an HTML input or button tag...

<input type="button" value="Press me!" />

or

<button>Press me!</button>
Amber
A: 

CSS:

.button{
     background-color: #000;
     color: #FF6600;
     font: bolder 1.0em Tahoma;
     border: 1px solid Yellow;
     padding: 2px;
}
.button:hover{
    border: 1px solid Red;   
}

HTML:

<input type="button" class="button" value="Button"/>
<input type="button" class="button" value="Another"/>

Try it: http://jsfiddle.net/eD9sf/

Michael Robinson
+1  A: 

If I understand you correctly, you want to make an arbitrary element look like a button?

Well ... just write CSS accordingly! Here's a kickoff example which makes a link look like a button:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>SO question 3489881</title>
        <style>
            a.button {
                display: inline-block;
                padding: 0 2px;
                background: lightgray;
                border: 2px outset lightgray;
                cursor: default;
            }
            a.button:active {
                border-style: inset;
            }
        </style>
    </head>
    <body>
        <p><a class="button">link</a>
    </body>
</html>
BalusC
with a little tinkering this can do exaclly what I want thanks