jesse23 Posted January 30, 2007 Share Posted January 30, 2007 So i have just recently installed a drop down menu that uses php to set a cookie. That page can be seen here.[url=http://www.campusgoal.com/school.php]www.campusgoal.com/school.php[/url] i am wondering how would i change the background of this to black and where is says school to white? Below i have posted the php code.[code]<form action="setcookie.php" method="post"><?echo '<p><label for="school"><strong>School : </strong></label><select name="school" id="school">'."\n";$sql = "SELECT ID, School FROM School";$result = mysql_query($sql, $db);$count = mysql_num_rows($result);if($count == 0){ echo '<option>No Schools added yet.</option>';}while($row = mysql_fetch_assoc($result)){ echo '<option value="'.$row['ID'].'"'; if($_COOKIE[Cookie]['SchoolID'] == $row['ID']) { echo ' selected'; } echo '>'.$row['School'].'</option>'."\n";}echo '</select>';?><input type="submit" name="submit" value="Go" /></p></form>[/code]Any help with this would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/36291-how-would-i-make-my-drop-down-background-black/ Share on other sites More sharing options...
JasonLewis Posted January 30, 2007 Share Posted January 30, 2007 that is not really to do with php but to do with css. change this:[code]<select name="school" id="school">[/code]to this:[code]<select name="school" id="school" style="background-color:black; color: white">[/code]i think that should do the trick though. Quote Link to comment https://forums.phpfreaks.com/topic/36291-how-would-i-make-my-drop-down-background-black/#findComment-172538 Share on other sites More sharing options...
jesse23 Posted January 30, 2007 Author Share Posted January 30, 2007 so close, it changed the actual drop down to black. Is there anything else that might change that outside black? ;D Quote Link to comment https://forums.phpfreaks.com/topic/36291-how-would-i-make-my-drop-down-background-black/#findComment-172556 Share on other sites More sharing options...
bibby Posted January 30, 2007 Share Posted January 30, 2007 Will that work in Safari?I usually don't style form elements because of that.What I see with Ubuntu/Firefox, it looks pretty cool Quote Link to comment https://forums.phpfreaks.com/topic/36291-how-would-i-make-my-drop-down-background-black/#findComment-172568 Share on other sites More sharing options...
jesse23 Posted January 30, 2007 Author Share Posted January 30, 2007 AHH safari, i cant tell you how many times i have had problems with previewing my site in safari and firefox and IE. They just cant seem to display the net the same. Yeah it dosent work in safari. I know i think it looks kind of cool like that too. Quote Link to comment https://forums.phpfreaks.com/topic/36291-how-would-i-make-my-drop-down-background-black/#findComment-172578 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.