configure inputs and label with css

Asked

Viewed 38 times

1

I’m having trouble aligning the label with the radio input, the label is below and the input is above. I’m using html and css. wanted the two of them to be on the same line with the radio input behind the label.

code:

<h2>Em outros jogos, qual seu estilo de personagem/jogada favorito?</h2>
       <input type="radio" name="selectxt" id="selectn4">
       <label for="selectn4">Muito dano, porém lento, e resistente</label>

css:

input[type = radio]{
display: flex;
align-items: center;

}

well, maybe I just have to call the label somehow, but I don’t have that knowledge.

  • 1

    If you put the input after the label and without css it looks like?

  • You are putting display:flex on Radio?

1 answer

2


Just Remove the css properties and it will look the way you want it to look

    <div>   
    <h2>Em outros jogos, qual seu estilo de personagem/jogada favorito?</h2>
        <input type="radio" name="selectxt" id="selectn4">
        <label for="selectn4">Muito dano, porém lento, e resistente</label>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.