Click here to Skip to main content
Click here to Skip to main content

fun with css part 1

, 13 Jun 2005 CPOL
Rate this:
Please Sign up or sign in to vote.
spice up your <input /> 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 Wink | ;-)
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Daniel Walzenbach
Program Manager Microsoft
United States United States
Program Manager Visual Studio

Comments and Discussions

 
GeneralProblems in IE PinmemberDewang Mehta14-Jul-07 17:32 
GeneralUsability PinsitebuilderUwe Keim13-Jun-05 20:42 
QuestionWhat about the fox!? Pinmemberoykica13-Jun-05 13:21 
AnswerRe: What about the fox!? PinmemberDaniel Walzenbach13-Jun-05 18:59 
GeneralRe: What about the fox!? Pinmemberoykica13-Jun-05 23:17 
GeneralRe: What about the fox!? PinmemberDaniel Walzenbach14-Jun-05 1:19 
GeneralRe: What about the fox!? Pinmemberoykica14-Jun-05 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150331.1 | Last Updated 13 Jun 2005
Article Copyright 2005 by Daniel Walzenbach
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid