johnseito Posted July 15, 2008 Share Posted July 15, 2008 <input name="firstname" type="text" value ="firstname"/> Does anyone know how to make the input value firstname in this example to a graycolor or any other color? thanks, Quote Link to comment https://forums.phpfreaks.com/topic/114763-make-field-value-color/ Share on other sites More sharing options...
sader Posted July 15, 2008 Share Posted July 15, 2008 <input name="firstname" type="text" value ="firstname" style="color:gray; background-color:red"/> http://www.w3schools.com/Css/default.asp Quote Link to comment https://forums.phpfreaks.com/topic/114763-make-field-value-color/#findComment-590096 Share on other sites More sharing options...
PseudoEvolution Posted July 15, 2008 Share Posted July 15, 2008 ^ Beat me to it! You can also apply background color, borders, size etc... Quote Link to comment https://forums.phpfreaks.com/topic/114763-make-field-value-color/#findComment-590097 Share on other sites More sharing options...
johnseito Posted July 15, 2008 Author Share Posted July 15, 2008 Kool thanks, how about option values? such as this: <option value="" <?php if ($_POST['gender'] == '') echo ' selected="selected"'; ?>>- Select One -</option> and ones with loops etc Quote Link to comment https://forums.phpfreaks.com/topic/114763-make-field-value-color/#findComment-590105 Share on other sites More sharing options...
sader Posted July 15, 2008 Share Posted July 15, 2008 U should learn what is Cascading Style Sheet (css) and how to work with it Quote Link to comment https://forums.phpfreaks.com/topic/114763-make-field-value-color/#findComment-590111 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.