So, here's the skinny...
I have a page that has a list as display:table-cell
. As the width of the browser resizes, the contents (anchors) of the lists may wrap to 2 lines. The problem is the anchors that don't wrap to 2 lines aren't staying 100% height.
CSS...
.home .pushes ul {display:table;}
.home .pushes ul li {display:table-cell; vertical-align:middle; width:25%; background-color:#e5a015; color:#ffffff;}
.home .pushes ul li a {display:block; padding:4em 0; padding:4rem 0;}
So, the height of <li>
should be determined by the height and padding of <a>
. But, since it's <display:table-cell>
, the height is determined by the tallest <a>
.
Ok, so just set a {height:100%;}
. But, then, the anchor doesn't keep the padding. So, just set li {height:160px;}
or something. But, then the anchor isn't vertically-centered. So, just set li {line-height:160px;}
. But, then the anchor is huge when it wraps to 2 lines.
So, what is a guy to do?
I could do li {display:inline-block;}
. But I want all the boxes to be the same height.
JJ
Edit...
HTML included for posterity...
<ul>
<li>bleh</li>
<li>bleh</li>
</ul>
JJ
Edit 2...
The anchor background color is what isn't growing the full height of its parent.
I didn't realize that I could upload an image. Thanks for the tip.
JJ