Previous Message
Next Message

Form displaying hidden fields for some reason

Sent by Callum on 29 October 2004 22:10


Hey Jody,

I changed the HTML and CSS slightly to achieve the desired result.

new CSS:

input.hidden {
        display: none;
        border: none;
        background-color: #fff;
}

(i removed the space between "input" and ".hidden")

The reason why this style was not applying to the hidden fields is because you
hadn't given then a "class="hidden"". CSS won't apply to the "type" attribute.

Hope this was helpful

Callum Mcleod
http://www.staticreality.co.nz


Quoting Jody Cleveland [EMAIL-REMOVED]>:

> Hello,
>
> I've got a form here:
> http://www.oshkoshnews.org/oshblog/registration.html
>
> It's basically a small form, just two fields. It also has a few hidden
> fields. For some reason, these are showing up on the page. Any ideas on
> what I may have done wrong?
>
> All the css is in the page, but here's the css for the form itself:
> label,input {
> 	display: block;
> 	width: 150px;
> 	float: left;
> 	margin-bottom: 10px;
> }
> label {
> 	text-align: right;
> 	width: 75px;
> 	padding-right: 20px;
> }
> br {
> 	clear: left;
> }
> input {
> 	background-color: #CCCCCC;
> 	border: 1px solid #666666;
> }
> input .hidden {
> 	border: 0px;
> 	background-color: white;
> }
> .buttons {
>  font-size: 10px;
>  background-color: #333333;
>  color: #FFFFFF;
>  margin-left: 60px;
> }
>
> And, here's the form html code:
>
> <form method="get" action="../formmail.php">
> 	<label for="name">Name</label>
> 	<input id="name" name="name" /><br />
> 	<label for="email">Email</label>
> 	<input id="email" name="email" /><br />
> 	<input type="submit" name="Submit" value="Join the blog"
> class="buttons" /><br />
> 	<input type="hidden" name="required" value="name,email" />
> 	<input type="hidden" name="recipient"
> [EMAIL-REMOVED]" />
> 	<input type="hidden" name="subject" value="I want to join
> Oshblog" />
> 	<input type="hidden" name="env_report"
> value="REMOTE_HOST,HTTP_USER_AGENT" />
> 	<input type="hidden" name="redirect_values" value="true" />
> </form>
>
> --
> Jody Cleveland
> Computer Support Specialist
> [EMAIL-REMOVED]
> ______________________________________________________________________
> css-discuss [EMAIL-REMOVED]]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>



______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: