[thelist] CSS Question

aardvark roselli at earthlink.net
Sat Jul 29 14:41:23 CDT 2000


> -----Original Message-----
> From: Palyne Gaenir
>
> Is one allowed to define and set a class to use
> inside a form input
> tag??  I have this weird thing where I have
> textareas and text boxes
> and I'm using CSS and they're all inside TD tags
> which are defined
> and yet they come out using different fonts when
> typed in.  And, I
> need to make some textareas that are totally PRE
> inside so that
> monospaced aligned data can be entered.  Are classes
> allowed/effective for form elements?

yes... to build on Erika's answer, which just addresses the
specs, you'll need to keep in mind how the browsers will
render it...

so, you can use a class, but then you should call it in the
<input>, like <input ... class="foo">...  NN4.x sometimes
does what you want...

you can also apply a style to all form elements in your
global CSS (NN4.x sometimes supports this as well):

input, select, textarea { font-family : Arial, Helvetica,
sans-serif ; font-size : 11px ; color : #000000 ; }

one thing, though, PRE, or what i assume you mean as <pre>,
indicates a fixed-width font... you should make sure you
have specified a fixed-width font in your CSS...

failing all that and assuming NN is giving you trouble, you
can even try to embed your style inline, like <input ...
style="font-family : 'Courier New', Courier,
fixed-width">...





More information about the thelist mailing list