php - How to style drop down list? -


this question has answer here:

how add css styles drop down list on form? searched lot on internet no useful results found. thanks

    echo  "<form method='post' action='advisor.php?view=$view'>     select student: <select name='data'>";     while($row = mysqli_fetch_array($query))         {                      echo "<option value=\"".$row[3] . "\">".$row[0] ." " . $row[1] . " (".$row[3].")".                     "</option>";         }       echo    " </select>         <input type='submit' name='submit' class='buttonm' value='show questions' />         </form>";      } 

check out - http://bavotasan.com/2011/style-select-box-using-only-css/

html

<div class="styled-select">    <select>       <option>here first option</option>       <option>the second option</option>    </select> </div> 

css

.styled-select select {    background: transparent;    width: 268px;    padding: 5px;    font-size: 16px;    line-height: 1;    border: 0;    border-radius: 0;    height: 34px;    -webkit-appearance: none; } 

for more elaborate styling need use javascript - http://tympanus.net/codrops/2012/10/04/custom-drop-down-list-styling/


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -