0
<?php
include "conexao.php";
$sql = "select * from categorias";
$dados = pg_query($sql);
$resposta = "";
while($linha = pg_fetch_array($dados)){
$nome_categoria = $linha["nome_categoria"];
$resposta .= "<option>".$nome_categoria."</option>";
}
$categoria = "<select>". $resposta."</select>";
pg_free_result($dados);
?>
HTML
<tr><td><a class="itens">Categoria:</td>
<td><?php echo $categoria;?></a></td></tr>
You will be welcome to the stack overflow. The select being generated in php and the styles application in it are two different things. Check whether that question Already answered does not solve your problem.
– gmsantos
Then there would be no way I could change the source of the results generated in select??
– Indaiara Ribeiro
Your question is how to apply css to a select/option element, this ?
– gmsantos
I would like to know how to change the source of what is shown inside a select
– Indaiara Ribeiro
In the question I put as link shows how to style select, just change the css and change the
font-family
. I recommend reading: [tour], [help] and [Ask]– gmsantos
Yes, but how do I call in CSS, since my select is in PHP ?? You can put a class in PHP ??
– Indaiara Ribeiro