Welcome to WebmasterWorld Guest from 54.161.99.20

Forum Moderators: not2easy

Message Too Old, No Replies

Applying CSS to form fields

Can't get Opera to apply the styles!

     
3:26 pm on Sep 26, 2002 (gmt 0)

New User

10+ Year Member

joined:Jan 22, 2002
posts:13
votes: 0


I'm trying to customize the look of form fields, but I can't get Opera to apply the styles.

I'm using Opera 6.04.

Here's a simple example:

In the STYLE definition:

.formElement
{ background:navy;
color:white;
font-weight:bold;
}

And in the form:

First Name: <input type="text" class="formElement" name="Fname" size="10">

Opera applies the font-weight, but ignores the colors. I've tried both background and background-color.

Note: I can apply the class to the opening FORM tag and get a navy background, white text, etc. But can't get it to work for individual form elements.

Any ideas anyone?

Thanks!

6:53 pm on Sept 26, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 18, 2002
posts:161
votes: 0


alas from:

[opera.com...]

"Note that while it is possible to style form controls in Opera, you can't make them look like anything other than form controls, eg by setting background color. The CSS specification doesn't require form control widgets to be styleable, and that can be in breach with the operating system UI guidelines. We still plan to support it one day."

asp

1:34 pm on Sept 27, 2002 (gmt 0)

New User

10+ Year Member

joined:Jan 22, 2002
posts:13
votes: 0


Thanks Asprin!

I checked the Opera site before I posted. Obviously I didn't look hard enough!

Looks like I can still use the effects, but Opera users won't see them. Fortunately, it doesn't break the form layout.

Thanks again!