Click here to Skip to main content
12,394,978 members (63,224 online)
Click here to Skip to main content
Add your own
alternative version

Stats

34.9K views
24 bookmarked
Posted

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

You may also be interested in...

Comments and Discussions

 
GeneralProblems in IE Pin
Dewang Mehta14-Jul-07 16:32
memberDewang Mehta14-Jul-07 16:32 
GeneralUsability Pin
Uwe Keim13-Jun-05 19:42
sitebuilderUwe Keim13-Jun-05 19:42 
QuestionWhat about the fox!? Pin
oykica13-Jun-05 12:21
memberoykica13-Jun-05 12:21 
AnswerRe: What about the fox!? Pin
Daniel Walzenbach13-Jun-05 17:59
memberDaniel Walzenbach13-Jun-05 17:59 
GeneralRe: What about the fox!? Pin
oykica13-Jun-05 22:17
memberoykica13-Jun-05 22:17 
GeneralRe: What about the fox!? Pin
Daniel Walzenbach14-Jun-05 0:19
memberDaniel Walzenbach14-Jun-05 0:19 
GeneralRe: What about the fox!? Pin
oykica14-Jun-05 3:27
memberoykica14-Jun-05 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.160721.1 | Last Updated 13 Jun 2005
Article Copyright 2005 by Daniel Walzenbach
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid