TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-28-2008, 01:23 PM   #1 (permalink)
The Contributor
 
Join Date: May 2008
Location: Iran
Posts: 53
Thanks: 33
Yoosha is on a distinguished road
Help Define different Bg color for InputText & InputSubmit

Hi,
How can i:
Define different Bg color for InputText & InputSubmit?
Send a message via Yahoo to Yoosha
Yoosha is offline  
Reply With Quote
Old 06-28-2008, 01:29 PM   #2 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

Heres a tut I wrote a while back.

Images Within Form Fields | CoryMathews.com
CoryMathews is offline  
Reply With Quote
The Following 2 Users Say Thank You to CoryMathews For This Useful Post:
mfolnovich (07-01-2008), Yoosha (06-29-2008)
Old 06-28-2008, 07:03 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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

form input[type="submit"]
{
    background-color: #FF0000;
}
delayedinsanity is offline  
Reply With Quote
The Following 2 Users Say Thank You to delayedinsanity For This Useful Post:
mfolnovich (07-01-2008), Yoosha (06-29-2008)
Old 06-29-2008, 09:31 AM   #4 (permalink)
The Contributor
 
Join Date: May 2008
Location: Iran
Posts: 53
Thanks: 33
Yoosha is on a distinguished road
Default

Thanks, resolved! ;)
What is your HTML editor?
Send a message via Yahoo to Yoosha
Yoosha is offline  
Reply With Quote
Old 07-01-2008, 12:54 AM   #5 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Notepad.


Why do you ask?
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 07-01-2008, 02:11 AM   #6 (permalink)
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
Kalle is on a distinguished road
Default

Quote:
Originally Posted by delayedinsanity View Post
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 =)
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 07-01-2008, 03:33 PM   #7 (permalink)
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

Quote:
Originally Posted by Kalle View Post
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.
Ross is offline  
Reply With Quote
Old 07-01-2008, 04:31 PM   #8 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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
delayedinsanity is offline  
Reply With Quote
Old 07-01-2008, 05:21 PM   #9 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

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.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 07-01-2008, 05:45 PM   #10 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:52 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design