Home › Forums › CSS › Vertical aligning divs in li's? › Reply To: Vertical aligning divs in li's?
October 24, 2014 at 2:05 pm
#187008
Paulie_D
Member
You have the li
as display:table
when, I feel, they should be display:table-cell
http://codepen.io/Paulie-D/pen/jgGHn
Is there any reason why you can’t just give #box a 20px top margin?
Only that you are committing yourself to hard-coding something that you might have to change later if the height of the cell changes.
Avoiding fixed px values should avoided IMO for proper responsiveness if other, more flexible/dynamic, options are available.
It’s probably not something you can always avoid…but this is certainly one instance where you can.