Click to See Complete Forum and Search --> : [RESOLVED] IE: label padding no added to height?


peachskittle
02-26-2010, 03:30 PM
Hello all. My problem can be seen with the following:


<ul>
<li><label style="padding:10px 0; background: #ccc; border: 1px solid #000;">Test</label></li>
<li><label style="padding:10px 0; background: #ccc; border: 1px solid #000;">Test</label></li>
<li><label style="padding:10px 0; background: #ccc; border: 1px solid #000;">Test</label></li>
<li><label style="padding:10px 0; background: #ccc; border: 1px solid #000;">Test</label></li>
</ul>


The label's padding is ignored by the list's "li" and the li only leaves enough height for the text of the label only. Result....everything squished.

This is in IE 8/7/6. FF is happy. Can someone give me a hand here? Position relative doesn't do a thing, the only thing I've been able to do is set a height to force the height of the li, but that's not going to fly as the label could span more than 1 line. Any insight would be lovely. Thanks!

Webnerd
02-26-2010, 09:54 PM
how about a line-height?

peachskittle
03-01-2010, 09:44 AM
Line height does "work" but once the label goes to multi line, it becomes way too much space...

However, not sure why this didn't happen for me on Friday, but probably because it was Friday and I was brain dead.

li = display block
li label = display inline-block.

Solves the issue. I think. Not breaking yet, going to mark as resolved.