Topic: Form CSS (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11167" title="Pages that link to Topic: Form CSS (Page 1 of 1)" rel="nofollow" >Topic: Form CSS <span class="small">(Page 1 of 1)</span>\

 
p.i.x.e.l
Obsessive-Compulsive (I) Inmate

From:
Insane since: Mar 2004

posted posted 03-09-2004 06:39

I've seen it everywhere - and yet I have no clue how to go about implementing it into my site. How do you add .CSS to a form like a user/password entry?

p.i.x.e.l

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 03-09-2004 07:46

It is just like other forms of CSS

code:
input {
color: black;
background: white;
border: 1px solid black;
}



This simply goes into your CSS file. You can modify this to your like. This will change all input based items. You can do the same for a textarea or a select, or anything else. You can tweak the above and add to it as much as you like. You can get some cool outline effects like shadowing by modifying the individual sides of the background, make top and left gray and bottom and right black, for example.

-Dan-

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 03-09-2004 13:39

Warmage gave the example.

The real answer though, is "the same way you do for everything else."

Any HTML element can have style information set for it in the style sheet - if you can style a <div>, you can style an <input>, or list, or anything else.



Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 03-09-2004 14:29

sorry for sort of highjacking this thread:

How would I selectivly style just a submit button via css, instead of all inputs? (Can't add a class to the submit button.
Don't ask. Long story involving a cms system. .sourroundingTableClass input[type=submit] doesn't work.)

Thanks,
TP,
who just seems to use the wrong words for google today.

[This message has been edited by Tyberius Prime (edited 03-09-2004).]

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 03-09-2004 17:09

I don't know of any way to do that reliably without a class. =(


HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 03-09-2004 17:11
quote:
How would I selectivly style just a submit button via css


input[type=submit] should work, although not in IE. I think the IE7 htc (http://dean.edwards.name/IE7/) added support for that though.

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 03-09-2004 23:01

would an inline style work for this special need?

u-neek
Bipolar (III) Inmate

From: Berlin, Germany
Insane since: Jan 2001

posted posted 03-10-2004 00:52

.sourroundingTableClass input[id=thisID]
or
.sourroundingTableClass input[value=yourValue]


Both should work in *real* browsers.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 03-10-2004 01:33

And if most of the world used a real browser, we'd be all set

(unfortunately, they don't)

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 03-10-2004 08:50

that's what I feared.

Thanks guys,
guess I'll have to patch the cms' code to include a class then. shouldn't have any side effects at all....

so long,

Tyberius Prime



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu