...

View Full Version : css and forms



nexosis
12-29-2006, 04:56 PM
How do I add a background-color in forms?
How do I add a background-picture in forms, too?

nikkiH
12-29-2006, 05:11 PM
You put a div in between the form tags and apply colors/images to the div.

nexosis
12-29-2006, 05:25 PM
could we just make it


<style type="text/css">
input.1{background: myimage.jpg}
.2{background-color: #cfcccc}
</style>

_Aerospace_Eng_
12-29-2006, 05:51 PM
The syntax you are using is a little incorrect. First off ids or classes can't start with a number or special character. So using .1 and .2 is already incorrect. Second your background declaration contains no url(). Correct syntax would be

<style type="text/css">
input.one{background: url(myimage.jpg)}
.two{background-color: #cfcccc}
</style>

<form class="two">
<input class="one" type="text">
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum