googlemapを埋め込んで横幅をまとめてウィンドウの70%にしようと思い、cssに.maps-wrapper{
width:70%;}と書き、google chrome のコンソールで見てみたのですが、widthが反映されないようです
理由が分からなく困っております
詳しい方ご教示ください
HTML
1<div class="maps-wrapper"> 2<div class="maps"> 3<iframe src="https://hoge" width="640" height="480"></iframe> 4 </div> 5<div class="maps"> 6<iframe src="https://hoge" width="640" height="480"></iframe> 7 </div> 8</div>
css
1 2.maps-wrapper{ 3 width:70%; 4} 5 6.maps{ 7 position:relative; 8 width:100%; 9 padding-top:75%; 10 height:0; 11 overflow:hidden; 12 margin:0 auto; 13} 14 15.maps iframe{ 16 position:absolute; 17 top:0; 18 left:0; 19 height:100%; 20 width:100%; 21}
回答3件
あなたの回答
tips
プレビュー