how to center a select on htm?

-4

I'm doing a job and I honestly do not know what to do to focus a select. This is my code:

<p>
  <h1 id="inicio">
    Bienvenidos
  </h1>
  <ul id="Eliga su idioma idioma">
    Eliga su idioma
  </ul>
  <select style="text-align:center;" id="idioma" name="idioma" size="1">
      <option selected="selected" value="español">Español</option>
  </select>

If anyone knows I would appreciate it.

    
asked by Felipe Coggiola 05.05.2017 в 20:42
source

1 answer

2

I suggest you to enclose in div the select and in the div apply the attribute style

Example enclosing the select in a div :

<p>
  <h1 id="inicio">
    Bienvenidos
  </h1>
  <ul id="Eliga su idioma idioma">
    Eliga su idioma
  </ul>
  <div style="text-align:center;">
    <select id="idioma" name="idioma" size="1">
      <option selected="selected" value="español">Español</option>
    </select>
  </div>
    
answered by 05.05.2017 в 20:59