Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么我的Google maps api v3和侧面板在调整大小时无法填充我的页面?_Javascript_Css_Google Maps Api 3_Colors_Positioning - Fatal编程技术网

Javascript 为什么我的Google maps api v3和侧面板在调整大小时无法填充我的页面?

Javascript 为什么我的Google maps api v3和侧面板在调整大小时无法填充我的页面?,javascript,css,google-maps-api-3,colors,positioning,Javascript,Css,Google Maps Api 3,Colors,Positioning,我正在开发一个网页,左边有一个侧面板,上面有一个搜索栏,右边有一个Google maps api v3,填充了页面的其余部分。当我使浏览器在垂直方向上非常小时,在侧面板和地图以及浏览器底部之间会有一个空白。但是,文本将继续显示在浏览器的底部。它看起来像: 以下是我的css代码: <style type="text/css"> body {margin:0;} #panel {height:100%; width:300px; position:absolut

我正在开发一个网页,左边有一个侧面板,上面有一个搜索栏,右边有一个Google maps api v3,填充了页面的其余部分。当我使浏览器在垂直方向上非常小时,在侧面板和地图以及浏览器底部之间会有一个空白。但是,文本将继续显示在浏览器的底部。它看起来像:

以下是我的css代码:

<style type="text/css">

    body {margin:0;}
        #panel {height:100%; width:300px; position:absolute; padding:0;background-color:#8C95A0;}
            #header {padding:2px; text-align:center}
            #address_instruction {position:relative; top:7%; padding:2px; text-align:center}
            #geocoder {position:relative; top:8%; padding:2px; text-align:center}
            #toggle_instruction {position:relative; top:22%; padding:2px; text-align:center}
            #layers {position:relative; top:25%; padding:2px; text-align:center}
                #layer0 {padding:2px; text-align:center}
                #layer1 {padding:2px; text-align:center}
                #layer2 {padding:2px; text-align:center}
            #link {top:50%; position:relative; padding:2px; text-align:center}
        #map_canvas {height:100%; left:300px; right:0px; position:absolute; padding:0;}

</style>

面板内的ID指的是面板左侧的项目。为什么侧面板的背景颜色和贴图不延伸到浏览器的底部?

我可以通过更改并向面板添加以下内容来解决问题:{position:fixed;overflow:auto;}

这似乎是同一作者的重复。我发布了另一个,但这是一个不同的问题