HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
input text and input submit defaults?
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
jaktrip



Joined: 18 Apr 2005
Posts: 2

PostPosted: Mon Apr 18, 2005 3:32 am     input text and input submit defaults? Reply with quote

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

PostPosted: Mon Apr 18, 2005 7:21 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial