CSS - text align top on flex container

0 votes
36 views
added Feb 5 in CSS by lcjr First Warrant Officer (11,850 points)

To make text align to the top within a flex container, you can use the align-items property and set it to flex-start. This will align the text to the top of the flex container. Here's an example:

.container {
  display: flex;
  align-items: flex-start;
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...