form button text color-help-

Discussion in 'HTML & Website Design' started by indyonline, Dec 6, 2007.

  1. #1
    Hello everyone. I'm building a form and the text color for the page is white. The page uses CSS. and the style for the text is white. when I open the page the state select box and the submit and reset buttons the text on them is white. I have tried to edit this in the design view on dreamweaver and there is not an option. is there a way I can change the text color? Here is the code for the state selector if anybody wants to see it. I deleted most of the states out of the code so this is not so long.
    Thank you.

    <select name="State:" id="State:">
    <option value="AL">AL</option>
    <option value="AK">AK</option>
    <option value="AZ">AZ</option>
    <option value="WI">WI</option>
    <option value="WY">WY</option>
    </select>
     
    indyonline, Dec 6, 2007 IP
  2. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In your css, add:

    select { color: #anycoloryouwanthere; }

    :)
     
    Dondon2d, Dec 6, 2007 IP
  3. indyonline

    indyonline Prominent Member

    Messages:
    4,626
    Likes Received:
    248
    Best Answers:
    2
    Trophy Points:
    335
    #3
    thanks. I hope it works.
     
    indyonline, Dec 6, 2007 IP
  4. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Tell me if it doesn't ;)
     
    Dondon2d, Dec 6, 2007 IP
  5. indyonline

    indyonline Prominent Member

    Messages:
    4,626
    Likes Received:
    248
    Best Answers:
    2
    Trophy Points:
    335
    #5
    I'm not having any luck figuring that out. I need to make the text in that box black only. not on the rest of the page. Do you know if there is a code I can put with the color to that box. I dont know much about css. and I cant figure out how to add a color to the styles
     
    indyonline, Dec 6, 2007 IP
  6. rickvb

    rickvb Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #6
    select { background-color:#000000 }

    indicates that only the select boxes on the website will have a black background color.
     
    rickvb, Dec 7, 2007 IP
  7. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This may help..

    
    <style>
    
    select{
    color: #000;
    }
    
    input{
    color: #000;
    }
    
    submit{
    color: #000;
    }
    
    </style>
    
    HTML:
     
    Noddegamra, Dec 7, 2007 IP
  8. indyonline

    indyonline Prominent Member

    Messages:
    4,626
    Likes Received:
    248
    Best Answers:
    2
    Trophy Points:
    335
    #8
    where would i add that code? to the css or the page? and where in the code?
    thank you very much.
     
    indyonline, Dec 7, 2007 IP
  9. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Here is a basic example:

    
    
    <html>
    <head>
    <title>Your Page</title>
    <style>
    
    select{
    color: #000;
    background: #fff;
    }
    
    input{
    color: #000;
    background: #fff;
    }
    
    submit{
    color: #000;
    }
    
    </style>
    </head>
    <body>
    
    Put your form data here, such as
    
    <form action="example.html" method="POST">
    
    Name: <input type="text" name="name" />
    <br /><br />
    
    State: <select name="state" >
    <option value="AL">AL</option>
    <option value="AK">AK</option>
    <option value="AZ">AZ</option>
    <option value="WI">WI</option>
    <option value="WY">WY</option>
    </select>
    
    <input type="submit" value="Submit" />
    
    </form>
    
    </body>
    </html>
    
    
    HTML:

    I hope this helps you :)
     
    Noddegamra, Dec 10, 2007 IP
  10. Dvae

    Dvae Banned

    Messages:
    299
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    this will do.;)
     
    Dvae, Dec 10, 2007 IP
  11. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #11
    lol, yes, a nice +1 post count, but I think he needed a little more guidance/support, hence why I provided a more indepth answer :)
     
    Noddegamra, Dec 10, 2007 IP
  12. indyonline

    indyonline Prominent Member

    Messages:
    4,626
    Likes Received:
    248
    Best Answers:
    2
    Trophy Points:
    335
    #12
    Thank you all for your input. I figured it out. I had changed the main text color in the css file to white. so i changed it back and just changed the text color manually. Although after that I read these post and figured out now how to add a new style. Thanks everyone.
     
    indyonline, Dec 27, 2007 IP