Page 1 of 1

CSS: Accessing INPUT controls

Posted: Sat Sep 17, 2005 5:38 am
by raghavan20
If you run the code, you can see that anything I tried to access by input.controltype does not work.
anyone can tell me why???
suggestions are welcome.

Code: Select all

<style type = 'text/css'>
	input.submit{
		border:1px solid #000000; background-color:#0000FF; color:#FFFFFF;
	}
	
	INPUT.SUBMIT{
		border:1px solid #000000; background-color:#0000FF; color:#FFFFFF;
	}

	.button{
		border:1px solid #000000; background-color:#0000FF; color:#FFFFFF;
	}

	INPUT.BUTTON{
		border:1px solid #000000; background-color:#0000FF; color:#FFFFFF;
	}



	INPUT.TEXT{
 	  font-family:TrebuchetMS;
	  font-size:9pt;
	  font-weight:bold;
	  background-color:336699;
	  border-color:336699;
	  border-style:inset;
	  border-width:2px;
	  color:FFFFFF;
	}

</style>
<body>
<form>
<input type = 'submit' value ='submit' />
<input type = 'submit' value ='submit' class = 'button' />
<input type = 'button' value ='Click me'/>
<input type = 'text' value ='Click me'/>
</form>
</body>

Posted: Sat Sep 17, 2005 6:54 am
by n00b Saibot
because CSS only has input element and does not recognise the type="xxx" of input tag AFAIK. I too had this prob and workaround for me was to use classes as you may haev done.

HIH