Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to Disable form styles in CSS ??

How to Disable form styles in CSS ??
Thread Tools
Targon
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 05:53 AM
 
Im noticing more and more pages on the www changing the color of text entry fields.

Does anyone know what code i can enter to my custom style sheet to disable this behavior? I want text entry fields to remain white exactly the same as every other application in Mac OS X.


my current CSS


html, body, * {
font-family: Techno !important;
font-size: 10px !important;
font-weight: normal !important;
}
pre {
font-family: Techno !important;
}
a:visited, a:visited:hover, a:link:active {
color: purple !important;
}
a:link, a:visited, a:hover, a:active {
text-decoration: underline !important;
background-color: inherit !important;
}


Thanks
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 18, 2006, 06:19 AM
 
Code:
form, input { font-family: inherit !important; color: #fff !important; }
- should work, I’d think...

You might want to add borders and such things to your CSS file as well, since those are often also changed on websites.
     
Targon  (op)
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 06:32 AM
 
Thanks, i tried this, i noticed no change :-(

Just to be clear here is an example

http://cubase.net/phpbb2/search.php

the 2 text fields are the same color as the web page.
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 18, 2006, 06:40 AM
 
Originally Posted by Targon
Thanks, i tried this, i noticed no change :-(
Hm. That’s odd... user CSS is no different from embedded CSS, is it? If it works for styling a form/input field on a page (which it does), shouldn’t it also work as your user-specified style?
     
Targon  (op)
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 06:49 AM
 
one would think so.

I just noticed a subtle change. the color of the form did not change BUT the color of the TEXT has changed from black to white.
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 18, 2006, 06:59 AM
 
Duh!

Yeah, I’m an idiot. That should, obviously, have been

Code:
form, input { font-family: inherit !important; background: #fff !important; }
The “color” attribute is for text. I’m not sure exactly where my mind was when I wrote that. The Moon, most likely.
     
Targon  (op)
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 07:16 AM
 
hrm, seems only to be changing the color of the font to white from back.

ill have dinner and do some more research i think.
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 18, 2006, 07:28 AM
 
The second one still changes the font to white?!?

Are you sure it updated the CSS, then?
     
Targon  (op)
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 08:26 AM
 
yeah, absolutely saved it then in safari set style to NONE then selected the style again to make sure.
     
Targon  (op)
Grizzled Veteran
Join Date: Aug 1999
Location: a void where there should be ecstasy
Status: Offline
Reply With Quote
Jun 18, 2006, 08:55 AM
 
yes its working now. I don't know what the problem was copied that code to my Shiira sheet which is the same as the safari one, made a copy of it, trashed the safari one then renamed the copy safari now it works.

Now, getting to your last point you mentioned

"You might want to add borders and such things to your CSS file as well, since those are often also changed on websites."

Do you know any examples of these such things on the www ? and then of course some code to conteract what the author forces on me. I just want all text fields to be the same as the ones in Aqua UI in OSX.
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 18, 2006, 10:40 AM
 
I can’t think of any specific examples, no... But on my old (now defunct) blog, I styled input boxes and form fields to fit the design, and apart from changing the font and background colour, I also changed the border colour and margins, at least. (I changed all this [differently] on :hover, as well)

I did the same for buttons, by the way—turned them into flat, link-like objects with single borders (making them look like the other links on the site), rather than having them look like actual buttons.

The ‘counter-code’ would just be to set the border, margin, background, color, etc. tags to their standard value (play around a bit to find out what exactly that is) for each of these selectors.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:04 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,