473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Reset form control style

Hi,

I've run across a problem styling form controls (quel surprise), or rather
in this case, "unstyling" them. I'm trying to put together a theme for a
web application which has a fairly primitive theme engine. Specifically, I
can define *additional* CSS rules using the theme engine, but I can't
remove the pre-existing ones that come with the application.

For the vast majority of the theme this hasn't been a problem given that
overriding stuff with CSS is hardly difficult. However, the base CSS rules
apply styles to most form controls (buttons, text areas, etc). I'd like to
override this to get the browser to render the form controls in the
"default" style, i.e. the way it would render them without any CSS rules
applied (usually the OS style in things like Opera, IE, Safari, etc).

Unfortunately, I haven't found any way of doing this - either in a
portable "clean" manner, or even in a browser-specific manner. I suspect
the answer is "you can't", but it doesn't hurt to check with the experts
:-)
Cheers,

Dave.
Dec 21 '07 #1
3 4038
rf

"Dave Hughes" <da**@waveform.plus.comwrote in message
news:op***************@stewie.waveform.plus.com...
Hi,

I've run across a problem styling form controls (quel surprise), or rather
in this case, "unstyling" them. I'm trying to put together a theme for a
web application which has a fairly primitive theme engine. Specifically, I
can define *additional* CSS rules using the theme engine, but I can't
remove the pre-existing ones that come with the application.
Yes you can. Just use an additional rule specifying the default or initial
value. For example if the drezigner who designed the "application" specified
line-height as some number of pixels then specify line-height: normal;, the
initial value for this property.

--
Richard.
Dec 21 '07 #2
Scripsit Dave Hughes:
I'm trying to put together a
theme for a web application which has a fairly primitive theme
engine.
Just don't do that. Problem solved. Check some articles on usability.
The basic presentation of forms should be uniform _across the web_ to
serve the purpose of smooth _interaction_, rather than the dee-ziner's
artistic self-expression.
Specifically, I can define *additional* CSS rules using the
theme engine, but I can't remove the pre-existing ones that come with
the application.
What "application"? The browser? What _other_ "applications" underlie on
the web?
I'd like to override this to get the browser to render the form
controls in the "default" style, i.e. the way it would render them
without any CSS rules applied (usually the OS style in things like
Opera, IE, Safari, etc).
Just don't use "themes" for forms, mm'kay?
Unfortunately, I haven't found any way of doing this - either in a
portable "clean" manner, or even in a browser-specific manner.
There isn't, except perhaps in a highly browser-specific manner, and
usually not even that.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Dec 21 '07 #3
On Fri, 21 Dec 2007 14:31:12 -0000, Jukka K. Korpela <jk******@cs.tut.fi>
wrote:
Scripsit Dave Hughes:
>I'm trying to put together a
theme for a web application which has a fairly primitive theme
engine.

Just don't do that. Problem solved. Check some articles on usability.
The basic presentation of forms should be uniform _across the web_ to
serve the purpose of smooth _interaction_, rather than the dee-ziner's
artistic self-expression.
I agree entirely. In fact, that's the problem...
>Specifically, I can define *additional* CSS rules using the
theme engine, but I can't remove the pre-existing ones that come with
the application.

What "application"? The browser? What _other_ "applications" underlie on
the web?
Perhaps "web application" is wrong phrase in this context, although I'm
not currently aware of a widely accepted alternative (at least in my
domain as a software developer). Anyway, the "web application" in question
is Trac (http://trac.edgewall.org/), specifically version 0.10.
>I'd like to override this to get the browser to render the form
controls in the "default" style, i.e. the way it would render them
without any CSS rules applied (usually the OS style in things like
Opera, IE, Safari, etc).

Just don't use "themes" for forms, mm'kay?
Indeed - Trac by default styles its forms (e.g. see
http://trac.edgewall.org/newticket), and I want *remove* the styling. I
don't actually think the default style is "bad" exactly (it's far from the
worst I've seen), but in the interest of usability I'd like to use the
browser's default style of controls as it's what the user is most likely
to be familiar with (especially in the case of browsers that use the OS to
render unstyled form controls).

Unfortunately, Trac 0.10's theme engine only allows one to define
*additional* stylesheets - one cannot remove the existing stylesheets
shipped with the application. Obviously, one could remove or edit the
stylesheets on a given installation but that's outside the purview of the
theme engine (and would break the ability to easily revert to the default
style should the administrator wish to do so).
>Unfortunately, I haven't found any way of doing this - either in a
portable "clean" manner, or even in a browser-specific manner.

There isn't, except perhaps in a highly browser-specific manner, and
usually not even that.
I'm aware this is the case for styling form controls, but I was hoping
(probably stupidly :-) that it might not be the case for "unstyling" them.
Given that I couldn't seem to find anything on overriding form control
styles to reset them to the browser's default (beyond "delete the rules"),
I was hoping I'd missed something obvious.
Thanks,

Dave.
Dec 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe Bloggs | last post by:
I have a form which includes a checkbox field. I need to add a reset, I add a HTML reset it works fine before I submit the form but not after. I know I must add some code to reset the checkbox on...
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
1
by: sck10 | last post by:
Hello, I have a table with some controls in it, but it is not rapped in a form. I also have a button for reseting the page. When I click the button, the page resets, but I get the following...
16
by: Animesh K | last post by:
What's the best practice for using an image for a reset button? Unfortunately, we cannot use <input type="image" src="..."in this case. Any helpful tutorial from the web will be appreciated. I...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
2
by: DarthPeePee | last post by:
Hello everyone. I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix. When pressing the "Clear Password & Try Again" button, the password clears...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.