Webmaster Forum

Go Back   Webmaster Forum > Web Development > Web Design Lobby

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 12-31-2008, 11:44 AM
2939195631902 2939195631902 is offline
Contributing Member
 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
Modify the background color of input field !!

Is there a way to modify the:

1. text color of input field
2. *background color of input field
3. the color/style of the input border

using just css? Php at the most..
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 12-31-2008, 02:37 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
Applying CSS to forms

Fancy Form Design Using CSS

Prettier Accessible Forms
 
Reply With Quote
  #3  
Old 01-01-2009, 05:31 AM
murrayd77 murrayd77 is offline
Junior Member
 
Join Date: 12-29-08
Posts: 2
iTrader: 0 / 0%
Yes, you can change them. Try applying style to your stylesheet you can have your desired color as background to text fields.

Try this piece of CSS with your stylesheet

textarea {
border-style: ridge;
background:#003399;
background-repeat: repeat;
margin: 1px 1px 1px 5px;
color: #000000;
}

instead of textarea, try for text field etc., I believe this will help you...

-- Dave.
 
Reply With Quote
  #4  
Old 01-01-2009, 08:04 PM
2939195631902 2939195631902 is offline
Contributing Member
 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
It works! Thanks man
 
Reply With Quote
  #5  
Old 01-02-2009, 07:52 AM
Gamblor Gamblor is offline
Member
 
Join Date: 01-02-09
Posts: 46
iTrader: 0 / 0%
htmlbasictutor has listed some very good tutorials.

Also keep in mind this same concept can be used for giving your forms error handling which is extremely important. So for example you have the normal white background of an input box but using css you can apply a class to it

input.error {
background-color: red;
}

and now if there is an error you apply that class to the input box and you should get a red background. In my opinion one of the most useful bits of knowledge with any type of website you are building.
 
Reply With Quote
  #6  
Old 01-02-2009, 08:55 PM
kenbleu's Avatar
kenbleu kenbleu is offline
Contributing Member
 
Join Date: 07-22-08
Location: Roxas City, Capiz
Posts: 94
iTrader: 0 / 0%
or you could do this:

<input type="text" style="background-color: #F00;">
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice on how to modify a logo fairyjo Graphic Design Forum 27 05-08-2008 10:39 PM
Different Background / Page Color in Header vs Post and side bard Educator Blogging Forum 5 12-28-2007 09:10 AM
Change INPUT type=text hover color Luiz Ricardo Mouro Web Design Lobby 1 02-09-2007 08:37 AM
how to get input field + submit button same size Kalina Coding Forum 4 04-30-2006 12:10 AM
How can I modify a java applet? Jason Web Design Lobby 3 09-18-2004 12:14 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:14 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC