height: 100px;
ile bölüme sahip ve içeride bir bağlantı içeriyorsa - değeri sabit kodlama yapmadan bölümün yüksekliğini doldurabilir miyim?Bağlantı yüksekliğini, ana sayfanın% 100'üne ayarlayın
<div><a href="#">hello</a></div>
div {
height: 100px;
width: 100px;
background: red;
}
a {
background: green;
height: 100%; /* This does not work. Is it possible to set this height to 100% of container? */
}
Fiddle: http://jsfiddle.net/nPL65/
ayarlandığını ispatlıyorsa, tüm divı doldurmak istiyorsanız, 'min-height: 100% 'olarak değiştirin –