I am trying to create the following layout:
https://i.sstatic.net/HYNDw.png
Here is what I need:
- The word
total
and the number120
should align vertically in the center - The words
per month
should align at the bottom with respect to the number 120 - The word group
120
andper month
should be right aligned (utilizingfloat:right
in the css class 'incident-container')
I tried using the css style display:table-cell
. While it addressed point 3, vertical alignment as mentioned in point 1 did not work.
You can view a demo of my code on jsfiddle here: http://jsfiddle.net/kongakong/151eprrk/
The current output looks like this:
https://i.sstatic.net/utmh9.png
An answer on Stack Overflow (Vertically centering a div inside another div) suggests using flex
for center alignment.
I made the following attempt based on that suggestion: http://jsfiddle.net/kongakong/151eprrk/4/
However, it still does not produce the desired outcome:
https://i.sstatic.net/tzWgj.png
If anyone can identify what is incorrect or lacking, please let me know.