 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
jaktrip
Joined: 18 Apr 2005 Posts: 2
|
Posted: Mon Apr 18, 2005 3:32 am input text and input submit defaults? |
|
|
|
Hi,
is it possible with CSS to define different defaults for each INPUT object. It is quite annoying that when you set a default width for input it is set for text and also for e.g. buttons...
Greets,
JTR |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Mon Apr 18, 2005 7:21 am |
|
|
|
Use Pseudo Classes
| Code: |
<!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: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
color: #FF0000;
background-color: #CCCCFF;
height: 25px;
width: 100px;
border: thin solid #FF0000;
}
.mybutton {
font-family: "Times New Roman", Times, serif;
font-size: 10px;
font-style: italic;
color: #FFFFFF;
background-color: #333333;
height: 50px;
width: 200px;
border: 1px solid #999999;
}
.textbox {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 5px;
height: 300px;
width: 300px;
}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="">
<textarea name="textarea" class="textbox"></textarea>
<input name="Button" type="button" class="mybutton" value=".mybutton">
<input type="submit" name="Submit" value="default">
</form>
</body>
</html>
|
http://www.w3schools.com/css/css_pseudo_classes.asp |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|