Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

fun with css part 1

0.00/5 (No votes)
13 Jun 2005 1  
spice up your fields

Sample Image - fun_with_css_part_1.jpg

Introduction

Well, I don't know about you but I can't stand those plain html buttons. Fortunately though there is a solution ;-)
Just create a .css file like the following

.niceButton
{ 
    padding: 0px 4px 4px 4px;
    font-size: 8pt; 
    font-family: Verdana; 
    height: 19px; 
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#dcdcdc, EndColorStr=#ffffff);
    border-right: #7b9ebd 1px solid;
    border-top: #7b9ebd 1px ridge; 
    border-left: #7b9ebd 1px ridge;
    border-bottom: #7b9ebd 1px ridge;
} 

set the <input /> control's class property to the .css class created above

<input type="submit" name="Button" value="this is nice" id="Button" class="niceButton" />

and enjoy.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here