Check out my jsFiddle example here: http://jsfiddle.net/pqCGd/.
Within the jsFiddle, you will find a large messages
div that contains multiple message
divs. In this example, I have manually provided an example of a message div instead of using auto-generation.
Each message
div contains 4 child divs:
dir
which includes an image (currently a test image is used)a
which has 3 sets of data, with the topp
tag being shorter than the restb
which also has 3 sets of data, with the lastp
tag being longer and requiring a smaller font sizec
which contains a button labeledview
Issue:
Observing a
, b
, or c
, you may notice that the divs are not aligned properly. The vertical positions of these divs seem to be off despite needing to be side-by-side at the same position level as the dir
div. To better visualize this issue, you can use Google Chrome's "inspect element" tool to view the div positions. By hovering over the elements, you will see a blue box displaying the size and position of each div. It should reveal that a
is lower than dir
, b
is lower than a
, and c
is lower than b
. The button
may also appear partially outside the div boundaries.
Goal:
I am seeking to align the y-positions of a
, b
, and c
with the y-position of dir
, ideally using CSS.
Important note: I am specifically targeting Google Chrome for testing purposes, so compatibility with other browsers is not a concern.