Forum Moderators: not2easy

Message Too Old, No Replies

How to Style Forms?

         

pab1953

6:28 pm on Jun 3, 2009 (gmt 0)

10+ Year Member



Can you style forms -- cell, text etc. -- the same as you would any other HTML using a style sheet? I've seen it done inline but I've never done it with a stylesheet.

Thanks.

pab1953

8:38 pm on Jun 3, 2009 (gmt 0)

10+ Year Member



I guess when I say "how to style forms," what I really mean, is how do I style form fields within a table.

Thanks.

BeeDeeDubbleU

7:26 am on Jun 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, you can do this. Just set styles for TD and TR, etc.

EG.
td {font-family: Arial, Helvetica, sans-serif; font-size: 0.7em;}

td.tablecellblue {background-color: #0000ff;}
td.tablecellred {background-color: #ff0000;}

[edited by: BeeDeeDubbleU at 7:28 am (utc) on June 4, 2009]

[edited by: swa66 at 2:14 pm (utc) on June 4, 2009]
[edit reason] fixed the unintended double # [/edit]

simonuk

12:16 pm on Jun 4, 2009 (gmt 0)

10+ Year Member



For the question you asked yes you can style forms. you can style form,label,input, legend etc

Just create the style sheet and add it like this:

form {border: 1px sold red;}
label {background-color:green;}

etc etc

Just don't use two hashes side by side as BeeDee's example shows, it should only have one ;-)

BeeDeeDubbleU

1:43 pm on Jun 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Strange? I don't know where that second hash came from?

swa66

2:15 pm on Jun 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I fixed the doubled "#" above to avoid confusion over it. Getting it all working is hard enough.

pab1953

6:41 pm on Jun 4, 2009 (gmt 0)

10+ Year Member



Thank you!