Styling Forms with CSS3 Selectors - Part 2

Forums » Dev.Opera » Archived Article Discussions

This topic has been closed. No new entries allowed.

Reason: You can now post comments on articles on Dev Opera

Forum rules and guidelines

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

12. December 2007, 14:44:47

teleject

Posts: 3

Styling Forms with CSS3 Selectors - Part 2

In the first part of this article, Christopher Schmitt talked about effective form styling using attribute selectors; now in part 2 he continues his exploration using CSS3 selectors to style enabled, disabled or checked form controls.

( Read the article )

30. December 2007, 14:57:46

jonyellow

Posts: 7

I was looking for an article about forms styling in CSS3 for quite some time and this one works fine for me. I'm especially grateful for the IE substitute for the unsupported opacity atribute.

30. December 2007, 15:58:35

henryjames

Posts: 8

I wish I could see the disable and enable attributes supported by a wider range of browsers. Hopefuly they will be available in some near future.

27. January 2008, 10:17:25 (edited)

Stifu

Posts: 1

The stepping further approach of coupling content auto-generation after the :disabledselector doesn't work


And it shouldn't work. Firefox has the correct behavior, actually. The :before and :after selectors should not be applicable to replaced elements.

See these links for more details on this:
https://bugzilla.mozilla.org/show_bug.cgi?id=169334
https://bugzilla.mozilla.org/show_bug.cgi?id=245633

30. January 2008, 21:04:58

chuck.han

Posts: 9

Opera Mini does not support the Javascript call:

element.firstChild.nodeValue = something;

Thus, in order to make an equivalent call, I changed the element to an <input type="button"> element and can make the call:

element.value = something;

I can change the style of the element so that it doesn't look a button, but Opera Mini still highlights it as a clickable object. To circumvent this problem, I can disable the <input> element, but then the element "looks" disabled (for example, style="color:red" is ignored and the element is dimmed).

I wish that Opera Mini handled the overriding style attributes for disabled <input> elements.

thanks, Chuck

31. January 2008, 14:07:15

chuck.han

Posts: 9

Actually, Opera Mini AND Opera Desktop don't support:

<input type="button" style="color:red" value="should be red" disabled/>

The text "should be red" is grayed out.

Forums » Dev.Opera » Archived Article Discussions