2016-07-02 9 views
0

私はthis codeで、ブラウザのウィンドウの高さが変更された場合でも、親の範囲内で子DIVをスクロールさせることに取り組んでいます。子のDIVをスクロール可能にする

I'm trying to get rid of this.

私だけ#FilterBox DIVなくTITLEをスクロールしたいです。 親の高さはheight: calc(91% - 80px);

どのようにすればいいですか?

コードスニペットのCSS部分をご覧ください。 親DIVは#ParentDivで、子DIVは#FilterBoxです。

function initMap() { \t \t //http://devfestmtm.appspot.com/#1 
 
\t \t var mapProp = { 
 
\t \t \t zoom: 4, 
 
\t \t \t center: {lat: 0 , lng: 0}, 
 
\t \t \t 
 
\t \t \t mapTypeControl: true, 
 
\t \t \t mapTypeControlOptions: 
 
\t \t \t { 
 
\t \t \t \t style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, 
 
\t \t \t \t position: google.maps.ControlPosition.LEFT_TOP, 
 
\t \t \t \t mapTypeIds: 
 
\t \t \t \t [ 
 
\t \t \t \t google.maps.MapTypeId.TERRAIN, 
 
\t \t \t \t google.maps.MapTypeId.SATELLITE, 
 
\t \t \t \t google.maps.MapTypeId.HYBRID, 
 
\t \t \t \t google.maps.MapTypeId.ROADMAP, 
 
\t \t \t \t ] 
 
\t \t \t }, 
 

 
\t \t \t mapTypeId: google.maps.MapTypeId.TERRAIN, 
 
\t \t \t 
 
\t \t \t 
 
\t \t \t zoomControl: true, \t \t //http://stackoverflow.com/questions/2437683/google-maps-api-v3-can-i-setzoom-after-fitbounds 
 
\t \t \t zoomControlOptions: 
 
\t \t \t { 
 
\t \t \t \t style: 'LARGE', 
 
\t \t \t \t position: 'RIGHT_CENTER', 
 
\t \t \t }, 
 
\t \t \t 
 
\t \t \t scaleControl: true, 
 
\t \t \t draggable: true, 
 
\t \t \t 
 
\t \t \t rotateControl: true, 
 
\t \t \t overviewMapControl: true, 
 
\t \t \t 
 
\t \t \t fullscreenControl: false, 
 
\t \t \t streetViewControl: false, 
 
\t \t \t scrollwheel: true, 
 
\t \t }; 
 
\t \t map = new google.maps.Map(document.getElementById('map'), mapProp); 
 
\t }
html,body { 
 
\t height: 100%; 
 
\t margin: 0px; 
 
\t padding: 0px 
 
\t } 
 
\t #map{ 
 
\t \t height: 100%; 
 
\t } 
 
\t #ParentDiv{ 
 
\t \t background-color: rgba(255,255,255,0.9); 
 
\t \t border: 2px solid #fff; 
 
\t \t border-radius : 3px; 
 
\t \t box-shadow: 0 2px 6px rgba(0,0,0,.3); 
 
\t \t border-style: solid; 
 
\t \t border-width: 1px; 
 
\t \t border-color: rgba(132,132,132,0.7); 
 
\t \t padding:0 5px 5px 5px; 
 
\t \t font-family: arial, sans-serif; 
 
\t \t position:fixed; 
 
\t \t min-width: 150px; 
 
\t \t top: 40px; 
 
\t \t left: 4px; 
 
\t \t text-align: left; 
 
\t \t margin-top: 7px; 
 
\t \t margin-left: 7px; 
 
\t \t z-index: 5; 
 
\t \t font-size: 11px; 
 
\t \t vertical-align:top; 
 
\t \t display: block; 
 

 
\t \t /* Firefox */ 
 
\t \t height: -moz-calc(91% - 80px); 
 
\t \t /* WebKit */ 
 
\t \t height: -webkit-calc(91% - 80px); 
 
\t \t /* Opera */ 
 
\t \t height: -o-calc(91% - 80px); 
 
\t \t /* Standard */ 
 
\t \t height: calc(91% - 80px); 
 
\t } 
 

 
\t #FilterBox{ 
 
    font-family: arial, sans-serif; 
 
    text-align: left; 
 
    margin-top: 7px; 
 
    padding-right: 20px;  
 
    display:block; 
 
    font-size: 11px; 
 
    float:left; 
 
    width:1000px; 
 
    overflow-y: auto; 
 
    height: 100px; 
 
\t }
<div id="map"></div> 
 
\t 
 
\t <!--- Change ParentDiv style to none and psqGeral unchecked ---> 
 
\t <div id="ParentDiv" style="display:block;"> 
 
\t <h1 class="DivTitle" style="background-color:gold; text-align:center;">TITLE<br></h1> 
 

 
\t <div id="FilterBox"> 
 

 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome1' value='ValueA' > SomeText - Some Text1 
 
\t \t </label> 
 
\t \t 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_1'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_1'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value1' > SomeText - Some Text1SomeText - Some Text1SomeText - Some Text1<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value2' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome2' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_2'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_2'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome3' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_3'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_3'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome4' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_4'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_4'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome5' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_5'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_5'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome6' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_6'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_6'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t <br> 
 
\t \t <label class="checkbox-inline"> 
 
\t \t \t <input type='checkbox' class='psqGeral' name='psqNome7' value='ValueB' > SomeText - Some Text2 
 
\t \t </label> 
 
\t \t <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_7'>+</span></a>]</font> 
 
\t \t <div style='display:display' class='classeEspecifica' id='div_classe_especifica_7'> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value3' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t \t <label class="checkbox-inline"> 
 
\t \t \t \t &nbsp;&nbsp;&nbsp;&nbsp;<input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value4' > SomeText - Some Text<br> 
 
\t \t \t </label> 
 
\t \t </div> 
 
\t \t 
 
\t \t <br> 
 
\t </div> 
 
\t </div>

+0

リンク/変更を迷子にすることができますし、それが起こるとき、それはのために役に立たない、この質問をします問題を再現する最小限の作業コードスニペットを投稿してください。 – LGSon

+0

@LGSon ok、すぐにやるよ! – GeoMaps

答えて

0

あなたは、#Filterboxcalc(100% - 80px)を使用すべきではない#ParentDiv

function initMap() { //http://devfestmtm.appspot.com/#1 
 
    var mapProp = { 
 
    zoom: 4, 
 
    center: { 
 
     lat: 0, 
 
     lng: 0 
 
    }, 
 

 
    mapTypeControl: true, 
 
    mapTypeControlOptions: { 
 
     style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, 
 
     position: google.maps.ControlPosition.LEFT_TOP, 
 
     mapTypeIds: [ 
 
     google.maps.MapTypeId.TERRAIN, 
 
     google.maps.MapTypeId.SATELLITE, 
 
     google.maps.MapTypeId.HYBRID, 
 
     google.maps.MapTypeId.ROADMAP, 
 
     ] 
 
    }, 
 

 
    mapTypeId: google.maps.MapTypeId.TERRAIN, 
 

 

 
    zoomControl: true, //http://stackoverflow.com/questions/2437683/google-maps-api-v3-can-i-setzoom-after-fitbounds 
 
    zoomControlOptions: { 
 
     style: 'LARGE', 
 
     position: 'RIGHT_CENTER', 
 
    }, 
 

 
    scaleControl: true, 
 
    draggable: true, 
 

 
    rotateControl: true, 
 
    overviewMapControl: true, 
 

 
    fullscreenControl: false, 
 
    streetViewControl: false, 
 
    scrollwheel: true, 
 
    }; 
 
    map = new google.maps.Map(document.getElementById('map'), mapProp); 
 
}
html, 
 
body { 
 
    height: 100%; 
 
    margin: 0px; 
 
    padding: 0px 
 
} 
 
#map { 
 
    height: 100%; 
 
} 
 
#ParentDiv { 
 
    background-color: rgba(255, 255, 255, 0.9); 
 
    border: 2px solid #fff; 
 
    border-radius: 3px; 
 
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3); 
 
    border-style: solid; 
 
    border-width: 1px; 
 
    border-color: rgba(132, 132, 132, 0.7); 
 
    padding: 0 5px 5px 5px; 
 
    font-family: arial, sans-serif; 
 
    position: fixed; 
 
    min-width: 150px; 
 
    top: 40px; 
 
    left: 4px; 
 
    text-align: left; 
 
    margin-top: 7px; 
 
    margin-left: 7px; 
 
    z-index: 5; 
 
    font-size: 11px; 
 
    vertical-align: top; 
 
    display: block; 
 
    height: calc(91% - 80px); 
 
} 
 
#FilterBox { 
 
    font-family: arial, sans-serif; 
 
    text-align: left; 
 
    margin-top: 7px; 
 
    padding-right: 20px; 
 
    display: block; 
 
    font-size: 11px; 
 
    float: left; 
 
    width: 1000px; 
 
    overflow-y: auto; 
 
    height: calc(100% - 80px); 
 
}
<div id="map"></div> 
 

 
<!--- Change ParentDiv style to none and psqGeral unchecked ---> 
 
<div id="ParentDiv" style="display:block;"> 
 
    <h1 class="DivTitle" style="background-color:gold; text-align:center;">TITLE<br></h1> 
 

 
    <div id="FilterBox"> 
 

 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome1' value='ValueA'>SomeText - Some Text1 
 
    </label> 
 

 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_1'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_1'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value1'>SomeText - Some Text1SomeText - Some Text1SomeText - Some Text1 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value2'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome1' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome2' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_2'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_2'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome2' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome3' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_3'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_3'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome3' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome4' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_4'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_4'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome4' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome5' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_5'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_5'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome5' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome6' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_6'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_6'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome6' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 
    <br> 
 
    <label class="checkbox-inline"> 
 
     <input type='checkbox' class='psqGeral' name='psqNome7' value='ValueB'>SomeText - Some Text2 
 
    </label> 
 
    <font style='font-size: 13px'>[<a style='text-decoration: none; cursor:pointer;' ><span id='span_classe_especifica_7'>+</span></a>]</font> 
 
    <div style='display:display' class='classeEspecifica' id='div_classe_especifica_7'> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value3'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
     <label class="checkbox-inline"> 
 
     &nbsp;&nbsp;&nbsp;&nbsp; 
 
     <input type='checkbox' class='psqEspecifica' name='psqNome7' value='Value4'>SomeText - Some Text 
 
     <br> 
 
     </label> 
 
    </div> 
 

 
    <br> 
 
    </div> 
 
</div>

外部サイトへ
+0

@GeoMapsテストしたときではなく、高さのサイズを変更するときに 'ParentDiv'全体がビューポートの下に移動します。その理由は 'top:40px'なので、' height:calc(91%-80px);を 'ParentDiv'に追加するか、' top:40px'を%に変更する必要があります – LGSon

0

以下のコードを試してみてください。あなたのニーズに合わせて高さと幅を調整してください。

#FilterBox{ 
    font-family: arial, sans-serif; 
    text-align: left; 
    margin-top: 7px; 
    padding-right: 20px;  
    display:block; 
    font-size: 11px; 
    float:left; 
    width:1000px; 
    overflow-y: auto; 
    height: 100px; 
} 
+0

しかし、ブラウザのウィンドウの高さを変更した場合でも、子DIVは親の高さを上回ります。あなたのコードもどうなるか見てみましょう:https://dl.dropboxusercontent.com/u/39041929/1.PNG – GeoMaps

関連する問題