JoHksi JoHksi - 6 months ago 10
CSS Question

Aligning items in different manner using css/flex

I am making a form right now.
I want to make tags align at the start of textfield and make textfields to be in the center. However, both textfield and tags are aligned in the center now. How can I align them as I intended? Please refer to Fiddle website:

https://jsfiddle.net/7g3vwt3x/

On the div I'm calling following style:

style="display:flex; flex-direction: column; align-items: center; justify-content: center"

Answer

On each of the tags, add the following styling:

h5.tag {
  align-self: flex-start;
}

Here's the updated fiddle for reference: https://jsfiddle.net/7g3vwt3x/1/