Im trying to apply background color for whole block c_date.. but its not working.. I tried clear, block everything..
HTML:
<div class="c_date"> <span class="c_day">30</span> <span class="c_month">Jun</span> <span class="c_year">2009</span> <div style="clear:both;"></div> </div> CSS:
.c_date { position: relative; width: 40px; color: #999; margin: -0px 0 0 0; background:#999 !important; display:block; border:1px solid #ccc; clear:both; } .c_day, .c_month, .c_year { position: absolute; } .c_day { font-size: 14px; top: 10px; } .c_month { top: 0; left: 0; font-size: 11px; } .c_year { top: 9px; right: 0; font-size: 9px; rotation: -90deg !important; /* ** Hacks ** */ -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); }
(the reason is position:absolute; in your other containers). So you can fix it by adding height to c_date style or changing position property of child elements in it.
c_dateblock is rendering with 2px height. You need to cleanup your markup, Try adding some height(say 50px) to it and you'll see the background color.position:absoluteon your span elements. this takes them out of being registered as elements effecting the parentdiv