14-06-2012, 03:45
Witam,
kolejny raz podparty już do ściany zgłaszam się do Was z prośbą o radę. Otóż chcę pobrać rozmiar okna - wysokość diva o id header i ustalić każdego diva o klasie miniature na wielkość równą
(okno-header)/3
div ten ma być kwadratem, dlatego też width również będzie miała identyczny wymiar.
Any idea?
kolejny raz podparty już do ściany zgłaszam się do Was z prośbą o radę. Otóż chcę pobrać rozmiar okna - wysokość diva o id header i ustalić każdego diva o klasie miniature na wielkość równą
(okno-header)/3
div ten ma być kwadratem, dlatego też width również będzie miała identyczny wymiar.
Kod:
<script>
$(document).ready(function() {
$('.miniature').height($(window).height()-$("#header").height());
});
</script>
Kod:
.miniature {
width: auto;
height: auto;
display: inline-block;
font-size: 0px;
background-size: cover;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
#header {
width: 100%;
bottom: 0px;
height: 70px;
background-color: #000;
position: fixed;
z-index: 2000;
}
Any idea?
