Posts Tagged ‘button properties’

Changing the size and appearance of the button using CSS

Wednesday, July 1st, 2009

Following code is the example for changing the size and look of the buttons!!!<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<style type=”text/css”>
<!–
input {
font-family: “Times New Roman”, Times, serif;
font-size: 12px;
font-weight: bold;
color: #FF0000;
background-color: #FFCCCC;
padding: 5px;
height: 30px;
width: 100px;
}
input.myButton {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: italic;
color: #660099;
background-color: #CCCCFF;
padding: 2px;
height: 25px;
width: 100px;
border: 1px solid #000000;
}
–>
</style>
</head>

<body>
<input type=”button” name=”Button” value=”Button”>
<input name=”textfield” type=”text” value=”123″>
<input type=”button” name=”Submit2″ value=”Button” class=”myButton”>
</body>
</html>