TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   XHTML, HTML, CSS (http://www.talkphp.com/xhtml-html-css/)
-   -   Define different Bg color for InputText & InputSubmit (http://www.talkphp.com/xhtml-html-css/3024-define-different-bg-color-inputtext-inputsubmit.html)

Yoosha 06-28-2008 01:23 PM

Define different Bg color for InputText & InputSubmit
 
Hi,
How can i:
Define different Bg color for InputText & InputSubmit?

CoryMathews 06-28-2008 01:29 PM

Heres a tut I wrote a while back.

Images Within Form Fields | CoryMathews.com

delayedinsanity 06-28-2008 07:03 PM

Code:

form input[type="text"]
{
    background-color: #CC0000;
}

form input[type="submit"]
{
    background-color: #FF0000;
}


Yoosha 06-29-2008 09:31 AM

Thanks, resolved! ;)
What is your HTML editor?

Aaron 07-01-2008 12:54 AM

Notepad.


Why do you ask?

Kalle 07-01-2008 02:11 AM

Quote:

Originally Posted by delayedinsanity (Post 16142)
Code:

form input[type="text"]
{
    background-color: #CC0000;
}

form input[type="submit"]
{
    background-color: #FF0000;
}


Just to note it, even thought it might not be that important then IE6 and lower will not interpret [attribute="value"] in CSS, so to gain IE6 and lower support use class names =)

Ross 07-01-2008 03:33 PM

Quote:

Originally Posted by Kalle (Post 16319)
Just to note it, even thought it might not be that important then IE6 and lower will not interpret [attribute="value"] in CSS, so to gain IE6 and lower support use class names =)

This has tripped me up quite a few times - it is however a great method of kepping your code clean. If you don't expect your target audience to be using IE6 I'd use this syntax - obviously check using an Analytics tool however to see what browsers your audience use.

delayedinsanity 07-01-2008 04:31 PM

What BOTH browsers need to do is program some kind of drop in module ability so that even older versions of the browsers can be updated with the new recommendations as they come out. Still running ie6? That's okay, it's got a built in check that runs against current W3C standards and downloads a new dom compliant sheet (with implementation rules) and runs CSS3! or something...
-m

Aaron 07-01-2008 05:21 PM

1) It isn't that simple
2) Security holes
3) To fix the security holes, you would need to set up a secure connection to the w3c standards source, which is slow. Through that secure connection you would need to download and implement the new specification through every page you visit. Otherwise, it would be the same as just updating your browser.

Most of the people still using IE6 are using it from a company mainframe that no-one updates.

edit: By the way, those files would be HUGE. A small part of the browsers job is to read something like HTML, apply default styles, user default styles, a stylesheet, and then a user stylesheet. This isn't all magic. Ir would need to go through serious changes from the update server.

delayedinsanity 07-01-2008 05:45 PM

1) I.. know. That. ;-)

I wasn't suggesting that it would be as simple as some random guy saying 'Hey! We outta do this!', I was merely suggesting that if it was implemented, it would be a very very cool thing. As for security holes, since it's a software application, it would take on the same security risk as you updating from FF2 to FF3. I was suggesting a drop in compiled module, not a constant input/output stream between the browser and the W3C.

The biggest problem with older browsers is that they're in use by home users that don't know they can upgrade or by large corporate armadas that can't allocate the resources to be bothered. Firefox doesn't tell you when to update to FF3 (though PHPBB can tell you, so I'm sure they could figure it out), however it does tell you when an add-on has an available upgrade. Therefore the rendering module could be treated as an add-on, with a built in invisible check.
-m


All times are GMT. The time now is 02:38 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0