Home › Forums › CSS › CSS Vertical-align challenge › Re: CSS Vertical-align challenge
December 12, 2012 at 12:28 pm
#117015
Anonymous
Inactive
One method you could use is set the five divs to display: inline-block; and vertical-align: middle;.
Only issue with this method is support in older versions of IE. That said you could just make float a fallback for IE and call it a day!
Let me know if you have issues, but I’m 90% certain this will work.
EDIT: One thing to note about this method is it will added extra spaces between your divs. Simply set the div wrapping those five divs to font-size: 0; and it should solve that problem.
Got it working based off your example pen: http://codepen.io/TheDark1105/pen/zfqam