You can't tell if it works or not only with css...
If you look at the documentation, you'll find there's an html context to use vertical-align
The vertical-align property can be used in two contexts:
To vertically align an inline element's box inside its containing line box. For example, it could be used to vertically position an image in a line of text.
To vertically align the content of a cell in a table.
Note that vertical-align only applies to inline, inline-block and table-cell elements: you can't use it to vertically align block-level elements.
Frontend developer 👩💻
Tech blogger 💻
Shares Experience, Tutorials, Resources and more… 🤓
Encourage girls to work in tech 👑
Scared of Backend and hates Java 😵
Mother of a 2yo girl 👧
Vertical-align applies to all inline-level elements, not just inline and inline-block. So it also applies to elements that are inline-table, inline-flex, and inline-grid. (Plus inline list-item in Firefox)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can't tell if it works or not only with css...
If you look at the documentation, you'll find there's an html context to use vertical-align
Thanks a lot for the precision, I didn't know about that.
Vertical-align applies to all inline-level elements, not just inline and inline-block. So it also applies to elements that are inline-table, inline-flex, and inline-grid. (Plus inline list-item in Firefox)