どうしても、sidber-rightの右側に空白ができてしまいます。どのようにHTMLまたはCSSを直せばよいでしょうか?
HTML5
1<!DOCTYPE html> 2<html> 3<head> 4 <meta charset="utf-8"> 5 <title>プレイ画面</title> 6 <link rel="stylesheet" href="stylesheet.css"> 7</head> 8<body> 9 <div class="header"> 10 <div class="header-left">プレイ画面</div> 11 <div class="header-right"> 12 <ul> 13 <li>メインメニュー</li> 14 <li>戻る</li> 15 </ul> 16 </div> 17 </div> 18 19 <div class="main"> 20 21 <div class="sidebar-left"> 22 <ul> 23 <li>ターン</li> 24 <li>ボタン2</li> 25 <li>ボタン3</li> 26 <li>ボタン4</li> 27 </ul> 28 </div> 29 30 <div class="contents"> 31 32 </div> 33 <div class="sidebar-right"> 34 35 </div> 36 37 </div> 38 39 <div class="footer"></div> 40</body> 41</html>
CSS3
1li { 2 list-style: none; 3} 4 5.header { 6 height: 65px; 7 border-bottom: 1px solid #dddddd; 8} 9 10.header-left { 11 float: left; 12 padding: 10px 60px; 13 color: #ED7000; 14 font-size: 30px; 15} 16 17.header-right { 18 float: right; 19 color: #808080; 20} 21 22.header-right li { 23 float: left; 24 padding: 20px 30px; 25 border-left: 1px solid #dddddd; 26} 27 28.selected { 29 color: #ED7000; 30} 31 32.main { 33 display: flex; 34} 35 36.footer { 37 height: 200px; 38 background-color: #FCFFC0; 39} 40 41.sidebar-left, 42.sidebar-right { 43 width: 10%; 44 height: 450px; 45 padding: 30px; 46 background-color: blue; 47 flex-shrink: 0; 48} 49 50.sidebar-left li { 51 color: white; 52 background-color: #40bfb0; 53 padding: 15px; 54 margin-bottom: 10px; 55} 56 57.contents { 58 width: 80%; 59 background-color: #E8E5FF; 60 overflow: hidden; 61 flex-shrink: 1; 62} 63 64.sidebar-right li { 65 color: white; 66 background-color: #40bfb0; 67 padding: 15px; 68 margin-bottom: 10px; 69} 70 71.contents-bottom { 72 background-color: red; 73} 74 75.base3 { 76 background-color: orange; 77}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。