Styling forms you didn't write
Posted: Tue Mar 14, 2006 3:50 pm
often times you didn't write a form (especially if it's provided by one of cms's modules), after some research, I found a technique that can help you style them:
basically: wrap the entire form in a , then use cascading stylesheets to handle the basic types of elements, you can also use fieldset and label attributes to do it.
Here's an overly simplified example.
basically: wrap the entire form in a , then use cascading stylesheets to handle the basic types of elements, you can also use fieldset and label attributes to do it.
Here's an overly simplified example.
Code: Select all
<__html>
<head><title>test</title>
<style type="text/css">
div.test input {border:solid 1px #cccccc; background-color: lime; color: red; }
div.test input[type="text"] {border:none; background-color: yellow; color: red; }
</style>
</head>
</__body>
<form action="#">
<input type="button" value="default">
<input type="text" value="stuff" size="20">
</form>
<div class="test">
<form action="#">
<input type="button" value="custom">
<input type="text" value="stuff" size="20">
</form>
</div>
<__body>
</__html>