2017-12-08 12 views
0

私は以下のスニペットを見ており、それを見ると、最も低いレベルのアイテムがコンテナの外にあることがわかります。divを内部に入れてください

私はposition:absolute; transform:translate(-33%)のためにそのことを知っています。 これまでのところ、私はこれまでのところ、要素をそのパラントの下に集中させることができた唯一の方法です。

3つの最も低い要素をコンテナに「入れる」方法がありますか?全体をスクロールできるようにしますか?

body { 
 
    background-color: #eaeaea; 
 
    width: 2000px 
 
} 
 

 
.CB { 
 
    background-color: #c4cfd8; 
 
    width: 1200px; 
 
    margin: 0 auto; 
 
    margin-top: 50px; 
 
    user-select: none; 
 
    white-space: nowrap; 
 
    overflow-x: auto; 
 
    overflow-y: hidden; 
 
    min-height: 200vh; 
 
} 
 

 
.CB .CB_Menu { 
 
    width: 100%; 
 
    height: 35px; 
 
    background-color: #fff; 
 
    margin-bottom: 20px; 
 
} 
 

 
.CB .CB_Content .Products, 
 
.CB .CB_Content .Parts { 
 
    text-align: center; 
 
} 
 

 
.CB .CB_Content .Products > div, 
 
.CB .CB_Content .Parts > div { 
 
    display: inline-block; 
 
} 
 

 
.CB .CB_Content .Products > div > div, 
 
.CB .CB_Content .Parts > div > div { 
 
    display: inline-table; 
 
} 
 

 
.CB .CB_Content .Products .Product, 
 
.CB .CB_Content .Parts .Product, 
 
.CB .CB_Content .Products .Part, 
 
.CB .CB_Content .Parts .Part { 
 
    width: 200px; 
 
    height: 200px; 
 
    background-color: #fff; 
 
    margin: 0 10px; 
 
    display: inline-table; 
 
    border-radius: 5px; 
 
    position: relative; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header, 
 
.CB .CB_Content .Parts .Product .Product_Header, 
 
.CB .CB_Content .Products .Part .Product_Header, 
 
.CB .CB_Content .Parts .Part .Product_Header, 
 
.CB .CB_Content .Products .Product .Part_Header, 
 
.CB .CB_Content .Parts .Product .Part_Header, 
 
.CB .CB_Content .Products .Part .Part_Header, 
 
.CB .CB_Content .Parts .Part .Part_Header { 
 
    background-color: #eaeaea; 
 
    width: 100%; 
 
    text-align: left; 
 
    border-top-left-radius: 5px; 
 
    border-top-right-radius: 5px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header span, 
 
.CB .CB_Content .Parts .Product .Product_Header span, 
 
.CB .CB_Content .Products .Part .Product_Header span, 
 
.CB .CB_Content .Parts .Part .Product_Header span, 
 
.CB .CB_Content .Products .Product .Part_Header span, 
 
.CB .CB_Content .Parts .Product .Part_Header span, 
 
.CB .CB_Content .Products .Part .Part_Header span, 
 
.CB .CB_Content .Parts .Part .Part_Header span { 
 
    font-size: 16px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header span a, 
 
.CB .CB_Content .Parts .Product .Product_Header span a, 
 
.CB .CB_Content .Products .Part .Product_Header span a, 
 
.CB .CB_Content .Parts .Part .Product_Header span a, 
 
.CB .CB_Content .Products .Product .Part_Header span a, 
 
.CB .CB_Content .Parts .Product .Part_Header span a, 
 
.CB .CB_Content .Products .Part .Part_Header span a, 
 
.CB .CB_Content .Parts .Part .Part_Header span a { 
 
    float: right; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content, 
 
.CB .CB_Content .Parts .Product .Product_Content, 
 
.CB .CB_Content .Products .Part .Product_Content, 
 
.CB .CB_Content .Parts .Part .Product_Content, 
 
.CB .CB_Content .Products .Product .Part_Content, 
 
.CB .CB_Content .Parts .Product .Part_Content, 
 
.CB .CB_Content .Products .Part .Part_Content, 
 
.CB .CB_Content .Parts .Part .Part_Content { 
 
    text-align: left; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left { 
 
    width: 50%; 
 
    min-height: 120px; 
 
    float: left; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left a { 
 
    display: block; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right { 
 
    width: 50%; 
 
    min-height: 120px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right img { 
 
    width: 100%; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer, 
 
.CB .CB_Content .Parts .Product .Product_Footer, 
 
.CB .CB_Content .Products .Part .Product_Footer, 
 
.CB .CB_Content .Parts .Part .Product_Footer, 
 
.CB .CB_Content .Products .Product .Part_Footer, 
 
.CB .CB_Content .Parts .Product .Part_Footer, 
 
.CB .CB_Content .Products .Part .Part_Footer, 
 
.CB .CB_Content .Parts .Part .Part_Footer { 
 
    position: absolute; 
 
    bottom: 0; 
 
    display: flex; 
 
    width: 100%; 
 
    align-items: center; 
 
    justify-content: center; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer a, 
 
.CB .CB_Content .Parts .Product .Product_Footer a, 
 
.CB .CB_Content .Products .Part .Product_Footer a, 
 
.CB .CB_Content .Parts .Part .Product_Footer a, 
 
.CB .CB_Content .Products .Product .Part_Footer a, 
 
.CB .CB_Content .Parts .Product .Part_Footer a, 
 
.CB .CB_Content .Products .Part .Part_Footer a, 
 
.CB .CB_Content .Parts .Part .Part_Footer a { 
 
    width: 50%; 
 
    height: 25px; 
 
    border: 1px solid #dddddd; 
 
    background-color: #eaeaea; 
 
    border-radius: 5px; 
 
    margin-bottom: 10px; 
 
    line-height: 25px; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer button, 
 
.CB .CB_Content .Parts .Product .Product_Footer button, 
 
.CB .CB_Content .Products .Part .Product_Footer button, 
 
.CB .CB_Content .Parts .Part .Product_Footer button, 
 
.CB .CB_Content .Products .Product .Part_Footer button, 
 
.CB .CB_Content .Parts .Product .Part_Footer button, 
 
.CB .CB_Content .Products .Part .Part_Footer button, 
 
.CB .CB_Content .Parts .Part .Part_Footer button { 
 
    width: 50%; 
 
    height: 25px; 
 
    border: 1px solid #dddddd; 
 
    background-color: #eaeaea; 
 
    border-radius: 5px; 
 
    margin-bottom: 10px; 
 
    padding: 4px 6px; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .lineTop { 
 
    height: 25px; 
 
    width: calc(100% - 25%); 
 
    border-top: 1px dotted #fff; 
 
    border-right: 1px dotted #fff; 
 
    border-left: 1px dotted #fff; 
 
    margin: 0 110px; 
 
    display: none; 
 
} 
 

 
.CB .CB_Content .lineTop.active { 
 
    display: block; 
 
} 
 

 
.CB .CB_Content .lineTop.none { 
 
    border-right: none; 
 
    width: 1px; 
 
    margin-top: -2px; 
 
} 
 

 
.CB .CB_Content .lineTop.two { 
 
    width: calc(100% - 50%); 
 
} 
 

 
.CB .CB_Content .lineTop .LineTop_Line { 
 
    width: 219px; 
 
    height: 100%; 
 
    border-right: 1px dotted #fff; 
 
    float: left; 
 
} 
 

 
.CB .CB_Content .lineBottom { 
 
    display: none; 
 
    height: 25px; 
 
    width: 100%; 
 
} 
 

 
.CB .CB_Content .lineBottom.active { 
 
    display: block; 
 
} 
 

 
.CB .CB_Content .lineBottom .LineBottom_Line { 
 
    width: 50%; 
 
    height: 100%; 
 
    border-right: 1px dotted #fff; 
 
} 
 

 
.CB .CB_Content .lineBottom .LineBottom_Line.Test { 
 
    width: calc(50% - 300px); 
 
}
<div class="CB"> 
 

 
    <div class="CB_Menu"> 
 
    header 
 
    </div> 
 

 
    <div class="CB_Content"> 
 

 
    <div class="Products"> 
 
     <div> 
 
     <div class="Product"> 
 
      <div class="Product_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Product_Content"> 
 
      <div class="Product_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Product_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Product_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="lineBottom active"> 
 
      <div class="LineBottom_Line"></div> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div class="Parts"> 
 
     <div> 
 
     <div class="lineTop active"> 
 
      <div class="LineTop_Line"></div> 
 
      <div class="LineTop_Line"></div> 
 
     </div> 
 
     <div> 
 
      <div class="Part"> 
 
      <div class="Part_Header"> 
 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
       <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
       </div> 
 
       <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
       </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
       <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
      </div> 
 

 
      <div style="position:absolute; transform:translate(-33%)"> 
 
      <div class="lineBottom active"> 
 
       <div class="LineBottom_Line"></div> 
 
      </div> 
 

 
      <div class="sub_part"> 
 
       <div class="lineTop active"> 
 
       <div class="LineTop_Line"></div> 
 
       </div> 
 
       <div class="Parts"> 
 
       <div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
       </div> 
 
       </div> 
 
      </div> 
 
      </div> 
 

 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 

 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

+0

私はこの問題を解決しようとしていますが、あなたのCSSは本当に台無しにされた:/ – ZombieChowder

+0

@ZombieChowderそれが台無しにされた理由は? –

+0

私はちょっとあなたが必要なものを理解しています。 '.CB'セレクタから' width:1200px'を削除してください。これはあなたのページをコンテナで満たし、左右にスクロールします.... NEVERMIND。ボディは2000pxの幅を持ちます。 – Gezzasa

答えて

0

あなたはこれを達成しようとしていますか?変更する必要があります:

  • 身体の幅、つまり幅:2000pxを削除します。
  • CBクラスの固定幅、つまり幅:1200pxを削除します。

幅を自動に設定することも、そのままにしておくこともでき、必要に応じて横方向に拡張できます。

body { 
 
    background-color: #eaeaea; 
 
} 
 

 
.CB { 
 
    background-color: #c4cfd8; 
 
    width: auto; 
 
    margin: 0 auto; 
 
    margin-top: 50px; 
 
    user-select: none; 
 
    white-space: nowrap; 
 
    overflow-x: auto; 
 
    overflow-y: hidden; 
 
    min-height: 200vh; 
 
} 
 

 
.CB .CB_Menu { 
 
    width: 100%; 
 
    height: 35px; 
 
    background-color: #fff; 
 
    margin-bottom: 20px; 
 
} 
 

 
.CB .CB_Content .Products, 
 
.CB .CB_Content .Parts { 
 
    text-align: center; 
 
} 
 

 
.CB .CB_Content .Products > div, 
 
.CB .CB_Content .Parts > div { 
 
    display: inline-block; 
 
} 
 

 
.CB .CB_Content .Products > div > div, 
 
.CB .CB_Content .Parts > div > div { 
 
    display: inline-table; 
 
} 
 

 
.CB .CB_Content .Products .Product, 
 
.CB .CB_Content .Parts .Product, 
 
.CB .CB_Content .Products .Part, 
 
.CB .CB_Content .Parts .Part { 
 
    width: 200px; 
 
    height: 200px; 
 
    background-color: #fff; 
 
    margin: 0 10px; 
 
    display: inline-table; 
 
    border-radius: 5px; 
 
    position: relative; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header, 
 
.CB .CB_Content .Parts .Product .Product_Header, 
 
.CB .CB_Content .Products .Part .Product_Header, 
 
.CB .CB_Content .Parts .Part .Product_Header, 
 
.CB .CB_Content .Products .Product .Part_Header, 
 
.CB .CB_Content .Parts .Product .Part_Header, 
 
.CB .CB_Content .Products .Part .Part_Header, 
 
.CB .CB_Content .Parts .Part .Part_Header { 
 
    background-color: #eaeaea; 
 
    width: 100%; 
 
    text-align: left; 
 
    border-top-left-radius: 5px; 
 
    border-top-right-radius: 5px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header span, 
 
.CB .CB_Content .Parts .Product .Product_Header span, 
 
.CB .CB_Content .Products .Part .Product_Header span, 
 
.CB .CB_Content .Parts .Part .Product_Header span, 
 
.CB .CB_Content .Products .Product .Part_Header span, 
 
.CB .CB_Content .Parts .Product .Part_Header span, 
 
.CB .CB_Content .Products .Part .Part_Header span, 
 
.CB .CB_Content .Parts .Part .Part_Header span { 
 
    font-size: 16px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Header span a, 
 
.CB .CB_Content .Parts .Product .Product_Header span a, 
 
.CB .CB_Content .Products .Part .Product_Header span a, 
 
.CB .CB_Content .Parts .Part .Product_Header span a, 
 
.CB .CB_Content .Products .Product .Part_Header span a, 
 
.CB .CB_Content .Parts .Product .Part_Header span a, 
 
.CB .CB_Content .Products .Part .Part_Header span a, 
 
.CB .CB_Content .Parts .Part .Part_Header span a { 
 
    float: right; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content, 
 
.CB .CB_Content .Parts .Product .Product_Content, 
 
.CB .CB_Content .Products .Part .Product_Content, 
 
.CB .CB_Content .Parts .Part .Product_Content, 
 
.CB .CB_Content .Products .Product .Part_Content, 
 
.CB .CB_Content .Parts .Product .Part_Content, 
 
.CB .CB_Content .Products .Part .Part_Content, 
 
.CB .CB_Content .Parts .Part .Part_Content { 
 
    text-align: left; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left { 
 
    width: 50%; 
 
    min-height: 120px; 
 
    float: left; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left a, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left a, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left a { 
 
    display: block; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right { 
 
    width: 50%; 
 
    min-height: 120px; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right img, 
 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right img, 
 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right img { 
 
    width: 100%; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer, 
 
.CB .CB_Content .Parts .Product .Product_Footer, 
 
.CB .CB_Content .Products .Part .Product_Footer, 
 
.CB .CB_Content .Parts .Part .Product_Footer, 
 
.CB .CB_Content .Products .Product .Part_Footer, 
 
.CB .CB_Content .Parts .Product .Part_Footer, 
 
.CB .CB_Content .Products .Part .Part_Footer, 
 
.CB .CB_Content .Parts .Part .Part_Footer { 
 
    position: absolute; 
 
    bottom: 0; 
 
    display: flex; 
 
    width: 100%; 
 
    align-items: center; 
 
    justify-content: center; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer a, 
 
.CB .CB_Content .Parts .Product .Product_Footer a, 
 
.CB .CB_Content .Products .Part .Product_Footer a, 
 
.CB .CB_Content .Parts .Part .Product_Footer a, 
 
.CB .CB_Content .Products .Product .Part_Footer a, 
 
.CB .CB_Content .Parts .Product .Part_Footer a, 
 
.CB .CB_Content .Products .Part .Part_Footer a, 
 
.CB .CB_Content .Parts .Part .Part_Footer a { 
 
    width: 50%; 
 
    height: 25px; 
 
    border: 1px solid #dddddd; 
 
    background-color: #eaeaea; 
 
    border-radius: 5px; 
 
    margin-bottom: 10px; 
 
    line-height: 25px; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .Products .Product .Product_Footer button, 
 
.CB .CB_Content .Parts .Product .Product_Footer button, 
 
.CB .CB_Content .Products .Part .Product_Footer button, 
 
.CB .CB_Content .Parts .Part .Product_Footer button, 
 
.CB .CB_Content .Products .Product .Part_Footer button, 
 
.CB .CB_Content .Parts .Product .Part_Footer button, 
 
.CB .CB_Content .Products .Part .Part_Footer button, 
 
.CB .CB_Content .Parts .Part .Part_Footer button { 
 
    width: 50%; 
 
    height: 25px; 
 
    border: 1px solid #dddddd; 
 
    background-color: #eaeaea; 
 
    border-radius: 5px; 
 
    margin-bottom: 10px; 
 
    padding: 4px 6px; 
 
    color: #000; 
 
} 
 

 
.CB .CB_Content .lineTop { 
 
    height: 25px; 
 
    width: calc(100% - 25%); 
 
    border-top: 1px dotted #fff; 
 
    border-right: 1px dotted #fff; 
 
    border-left: 1px dotted #fff; 
 
    margin: 0 110px; 
 
    display: none; 
 
} 
 

 
.CB .CB_Content .lineTop.active { 
 
    display: block; 
 
} 
 

 
.CB .CB_Content .lineTop.none { 
 
    border-right: none; 
 
    width: 1px; 
 
    margin-top: -2px; 
 
} 
 

 
.CB .CB_Content .lineTop.two { 
 
    width: calc(100% - 50%); 
 
} 
 

 
.CB .CB_Content .lineTop .LineTop_Line { 
 
    width: 219px; 
 
    height: 100%; 
 
    border-right: 1px dotted #fff; 
 
    float: left; 
 
} 
 

 
.CB .CB_Content .lineBottom { 
 
    display: none; 
 
    height: 25px; 
 
    width: 100%; 
 
} 
 

 
.CB .CB_Content .lineBottom.active { 
 
    display: block; 
 
} 
 

 
.CB .CB_Content .lineBottom .LineBottom_Line { 
 
    width: 50%; 
 
    height: 100%; 
 
    border-right: 1px dotted #fff; 
 
} 
 

 
.CB .CB_Content .lineBottom .LineBottom_Line.Test { 
 
    width: calc(50% - 300px); 
 
}
<div class="CB"> 
 

 
    <div class="CB_Menu"> 
 
    header 
 
    </div> 
 

 
    <div class="CB_Content"> 
 

 
    <div class="Products"> 
 
     <div> 
 
     <div class="Product"> 
 
      <div class="Product_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Product_Content"> 
 
      <div class="Product_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Product_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Product_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="lineBottom active"> 
 
      <div class="LineBottom_Line"></div> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div class="Parts"> 
 
     <div> 
 
     <div class="lineTop active"> 
 
      <div class="LineTop_Line"></div> 
 
      <div class="LineTop_Line"></div> 
 
     </div> 
 
     <div> 
 
      <div class="Part"> 
 
      <div class="Part_Header"> 
 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
       <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
       </div> 
 
       <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
       </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
       <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
      </div> 
 

 
      <div style="position:absolute; transform:translate(-33%)"> 
 
      <div class="lineBottom active"> 
 
       <div class="LineBottom_Line"></div> 
 
      </div> 
 

 
      <div class="sub_part"> 
 
       <div class="lineTop active"> 
 
       <div class="LineTop_Line"></div> 
 
       </div> 
 
       <div class="Parts"> 
 
       <div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
        <div class="Part"> 
 
        <div class="Part_Header"> 
 
         <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
        </div> 
 
        <div class="Part_Content"> 
 
         <div class="Part_Content_Left"> 
 
         <a href="#">Link 1</a> 
 
         <a href="#">Link 2</a> 
 
         </div> 
 
         <div class="Part_Content_right"> 
 
         <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
         </div> 
 
        </div> 
 
        <div class="Part_Footer"> 
 
         <button>Show <i class="fa fa-caret-down"></i></button> 
 
        </div> 
 
        </div> 
 
       </div> 
 
       </div> 
 
      </div> 
 
      </div> 
 

 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 
     <div class="Part"> 
 
      <div class="Part_Header"> 
 
      <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
 
      </div> 
 
      <div class="Part_Content"> 
 
      <div class="Part_Content_Left"> 
 
       <a href="#">Link 1</a> 
 
       <a href="#">Link 2</a> 
 
      </div> 
 
      <div class="Part_Content_right"> 
 
       <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
 
      </div> 
 
      </div> 
 
      <div class="Part_Footer"> 
 
      <button>Show <i class="fa fa-caret-down"></i></button> 
 
      </div> 
 
     </div> 
 

 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

+1

スクロールして見てください。そうですね、それを評価する前に全ページでそれを実行しようとしています。 –

+0

いいえCBの幅を1200に保ちたいと思います。 –

+0

@PeterHansen 1200pxは、要素が不足しているために要素が外に出たり、オーバーフローする原因になります。固定1200 CBコンテナの内側に置くには、固定幅px幅ではなく%幅を持つようにノードを変更する必要があります。 –

0
<style> 
    body { 
    background-color: #eaeaea; 
    width: 2000px 
} 

.CB { 
    background-color: #c4cfd8; 
    width: 1200px; 
    margin: 0 auto; 
    margin-top: 50px; 
    user-select: none; 
    white-space: nowrap; 
    overflow-x: auto; 
    overflow-y: hidden; 
    min-height: 200vh; 
} 

.CB .CB_Menu { 
    width: 100%; 
    height: 35px; 
    background-color: #fff; 
    margin-bottom: 20px; 
} 

.CB .CB_Content .Products, 
.CB .CB_Content .Parts { 
    text-align: center; 
} 

.CB .CB_Content .Products > div, 
.CB .CB_Content .Parts > div { 
    display: inline-block; 
} 

.CB .CB_Content .Products > div > div, 
.CB .CB_Content .Parts > div > div { 
    display: inline-table; 
} 

.CB .CB_Content .Products .Product, 
.CB .CB_Content .Parts .Product, 
.CB .CB_Content .Products .Part, 
.CB .CB_Content .Parts .Part { 
    width: 200px; 
    height: 200px; 
    background-color: #fff; 
    margin: 0 10px; 
    display: inline-table; 
    border-radius: 5px; 
    position: relative; 
} 

.CB .CB_Content .Products .Product .Product_Header, 
.CB .CB_Content .Parts .Product .Product_Header, 
.CB .CB_Content .Products .Part .Product_Header, 
.CB .CB_Content .Parts .Part .Product_Header, 
.CB .CB_Content .Products .Product .Part_Header, 
.CB .CB_Content .Parts .Product .Part_Header, 
.CB .CB_Content .Products .Part .Part_Header, 
.CB .CB_Content .Parts .Part .Part_Header { 
    background-color: #eaeaea; 
    width: 100%; 
    text-align: left; 
    border-top-left-radius: 5px; 
    border-top-right-radius: 5px; 
} 

.CB .CB_Content .Products .Product .Product_Header span, 
.CB .CB_Content .Parts .Product .Product_Header span, 
.CB .CB_Content .Products .Part .Product_Header span, 
.CB .CB_Content .Parts .Part .Product_Header span, 
.CB .CB_Content .Products .Product .Part_Header span, 
.CB .CB_Content .Parts .Product .Part_Header span, 
.CB .CB_Content .Products .Part .Part_Header span, 
.CB .CB_Content .Parts .Part .Part_Header span { 
    font-size: 16px; 
} 

.CB .CB_Content .Products .Product .Product_Header span a, 
.CB .CB_Content .Parts .Product .Product_Header span a, 
.CB .CB_Content .Products .Part .Product_Header span a, 
.CB .CB_Content .Parts .Part .Product_Header span a, 
.CB .CB_Content .Products .Product .Part_Header span a, 
.CB .CB_Content .Parts .Product .Part_Header span a, 
.CB .CB_Content .Products .Part .Part_Header span a, 
.CB .CB_Content .Parts .Part .Part_Header span a { 
    float: right; 
    color: #000; 
} 

.CB .CB_Content .Products .Product .Product_Content, 
.CB .CB_Content .Parts .Product .Product_Content, 
.CB .CB_Content .Products .Part .Product_Content, 
.CB .CB_Content .Parts .Part .Product_Content, 
.CB .CB_Content .Products .Product .Part_Content, 
.CB .CB_Content .Parts .Product .Part_Content, 
.CB .CB_Content .Products .Part .Part_Content, 
.CB .CB_Content .Parts .Part .Part_Content { 
    text-align: left; 
} 

.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left, 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left, 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left, 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left, 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left, 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left, 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left, 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left, 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left, 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left, 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left, 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left, 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left, 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left, 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left, 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left { 
    width: 50%; 
    min-height: 120px; 
    float: left; 
} 

.CB .CB_Content .Products .Product .Product_Content .Product_Content_Left a, 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_Left a, 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_Left a, 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_Left a, 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_Left a, 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_Left a, 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_Left a, 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_Left a, 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_Left a, 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_Left a, 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_Left a, 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_Left a, 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_Left a, 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_Left a, 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_Left a, 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_Left a { 
    display: block; 
    color: #000; 
} 

.CB .CB_Content .Products .Product .Product_Content .Product_Content_right, 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right, 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right, 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right, 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right, 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right, 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right, 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right, 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right, 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right, 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right, 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right, 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right, 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right, 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right, 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right { 
    width: 50%; 
    min-height: 120px; 
} 

.CB .CB_Content .Products .Product .Product_Content .Product_Content_right img, 
.CB .CB_Content .Parts .Product .Product_Content .Product_Content_right img, 
.CB .CB_Content .Products .Part .Product_Content .Product_Content_right img, 
.CB .CB_Content .Parts .Part .Product_Content .Product_Content_right img, 
.CB .CB_Content .Products .Product .Part_Content .Product_Content_right img, 
.CB .CB_Content .Parts .Product .Part_Content .Product_Content_right img, 
.CB .CB_Content .Products .Part .Part_Content .Product_Content_right img, 
.CB .CB_Content .Parts .Part .Part_Content .Product_Content_right img, 
.CB .CB_Content .Products .Product .Product_Content .Part_Content_right img, 
.CB .CB_Content .Parts .Product .Product_Content .Part_Content_right img, 
.CB .CB_Content .Products .Part .Product_Content .Part_Content_right img, 
.CB .CB_Content .Parts .Part .Product_Content .Part_Content_right img, 
.CB .CB_Content .Products .Product .Part_Content .Part_Content_right img, 
.CB .CB_Content .Parts .Product .Part_Content .Part_Content_right img, 
.CB .CB_Content .Products .Part .Part_Content .Part_Content_right img, 
.CB .CB_Content .Parts .Part .Part_Content .Part_Content_right img { 
    width: 100%; 
} 

.CB .CB_Content .Products .Product .Product_Footer, 
.CB .CB_Content .Parts .Product .Product_Footer, 
.CB .CB_Content .Products .Part .Product_Footer, 
.CB .CB_Content .Parts .Part .Product_Footer, 
.CB .CB_Content .Products .Product .Part_Footer, 
.CB .CB_Content .Parts .Product .Part_Footer, 
.CB .CB_Content .Products .Part .Part_Footer, 
.CB .CB_Content .Parts .Part .Part_Footer { 
    position: absolute; 
    bottom: 0; 
    display: flex; 
    width: 100%; 
    align-items: center; 
    justify-content: center; 
} 

.CB .CB_Content .Products .Product .Product_Footer a, 
.CB .CB_Content .Parts .Product .Product_Footer a, 
.CB .CB_Content .Products .Part .Product_Footer a, 
.CB .CB_Content .Parts .Part .Product_Footer a, 
.CB .CB_Content .Products .Product .Part_Footer a, 
.CB .CB_Content .Parts .Product .Part_Footer a, 
.CB .CB_Content .Products .Part .Part_Footer a, 
.CB .CB_Content .Parts .Part .Part_Footer a { 
    width: 50%; 
    height: 25px; 
    border: 1px solid #dddddd; 
    background-color: #eaeaea; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    line-height: 25px; 
    color: #000; 
} 

.CB .CB_Content .Products .Product .Product_Footer button, 
.CB .CB_Content .Parts .Product .Product_Footer button, 
.CB .CB_Content .Products .Part .Product_Footer button, 
.CB .CB_Content .Parts .Part .Product_Footer button, 
.CB .CB_Content .Products .Product .Part_Footer button, 
.CB .CB_Content .Parts .Product .Part_Footer button, 
.CB .CB_Content .Products .Part .Part_Footer button, 
.CB .CB_Content .Parts .Part .Part_Footer button { 
    width: 50%; 
    height: 25px; 
    border: 1px solid #dddddd; 
    background-color: #eaeaea; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    padding: 4px 6px; 
    color: #000; 
} 

.CB .CB_Content .lineTop { 
    height: 25px; 
    width: calc(100% - 17%); 
    border-top: 1px dotted #fff; 
    border-right: 1px dotted #fff; 
    border-left: 1px dotted #fff; 
    margin: 0 110px; 
    display: none; 
} 

.CB .CB_Content .lineTop.active { 
    display: block; 
} 

.CB .CB_Content .lineTop.none { 
    border-right: none; 
    width: 1px; 
    margin-top: -2px; 
} 

.CB .CB_Content .lineTop.two { 
    width: calc(100% - 50%); 
} 

.CB .CB_Content .lineTop .LineTop_Line { 
    width: 219px; 
    height: 100%; 
    border-right: 1px dotted #fff; 
    float: left; 
} 

.CB .CB_Content .lineBottom { 
    display: none; 
    height: 25px; 
    width: 115%; 
} 

.CB .CB_Content .lineBottom.active { 
    display: block; 
} 

.CB .CB_Content .lineBottom .LineBottom_Line { 
    width: 50%; 
    height: 100%; 
    border-right: 1px dotted #fff; 
} 

.CB .CB_Content .lineBottom .LineBottom_Line.Test { 
    width: calc(50% - 300px); 
} 

.sub_part{ width: 445px; } 
    </style>  




    <div class="CB"> 

     <div class="CB_Menu"> 
     header 
     </div> 

     <div class="CB_Content"> 

     <div class="Products"> 
      <div> 
      <div class="Product"> 
       <div class="Product_Header"> 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
       </div> 
       <div class="Product_Content"> 
       <div class="Product_Content_Left"> 
        <a href="#">Link 1</a> 
        <a href="#">Link 2</a> 
       </div> 
       <div class="Product_Content_right"> 
        <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
       </div> 
       </div> 
       <div class="Product_Footer"> 
       <button>Show <i class="fa fa-caret-down"></i></button> 
       </div> 
      </div> 
      <div class="lineBottom active"> 
       <div class="LineBottom_Line"></div> 
      </div> 
      </div> 
     </div> 
     <div class="Parts"> 
      <div> 
      <div class="lineTop active"> 
       <div class="LineTop_Line"></div> 
       <div class="LineTop_Line"></div> 
      </div> 
      <div> 
       <div class="Part"> 
       <div class="Part_Header"> 
        <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
       </div> 
       <div class="Part_Content"> 
        <div class="Part_Content_Left"> 
        <a href="#">Link 1</a> 
        <a href="#">Link 2</a> 
        </div> 
        <div class="Part_Content_right"> 
        <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
        </div> 
       </div> 
       <div class="Part_Footer"> 
        <button>Show <i class="fa fa-caret-down"></i></button> 
       </div> 
       </div> 

       <div style="position:absolute; transform:translate(-33%)"> 
       <div class="lineBottom active"> 
        <div class="LineBottom_Line"></div> 
       </div> 

       <div class="sub_part"> 
        <div class="lineTop active"> 
        <div class="LineTop_Line"></div> 
        </div> 
        <div class="Parts"> 
        <div> 
         <div class="Part"> 
         <div class="Part_Header"> 
          <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
         </div> 
         <div class="Part_Content"> 
          <div class="Part_Content_Left"> 
          <a href="#">Link 1</a> 
          <a href="#">Link 2</a> 
          </div> 
          <div class="Part_Content_right"> 
          <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
          </div> 
         </div> 
         <div class="Part_Footer"> 
          <button>Show <i class="fa fa-caret-down"></i></button> 
         </div> 
         </div> 
         <div class="Part"> 
         <div class="Part_Header"> 
          <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
         </div> 
         <div class="Part_Content"> 
          <div class="Part_Content_Left"> 
          <a href="#">Link 1</a> 
          <a href="#">Link 2</a> 
          </div> 
          <div class="Part_Content_right"> 
          <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
          </div> 
         </div> 
         <div class="Part_Footer"> 
          <button>Show <i class="fa fa-caret-down"></i></button> 
         </div> 
         </div> 
         <div class="Part"> 
         <div class="Part_Header"> 
          <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
         </div> 
         <div class="Part_Content"> 
          <div class="Part_Content_Left"> 
          <a href="#">Link 1</a> 
          <a href="#">Link 2</a> 
          </div> 
          <div class="Part_Content_right"> 
          <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
          </div> 
         </div> 
         <div class="Part_Footer"> 
          <button>Show <i class="fa fa-caret-down"></i></button> 
         </div> 
         </div> 
        </div> 
        </div> 
       </div> 
       </div> 

      </div> 
      <div class="Part"> 
       <div class="Part_Header"> 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
       </div> 
       <div class="Part_Content"> 
       <div class="Part_Content_Left"> 
        <a href="#">Link 1</a> 
        <a href="#">Link 2</a> 
       </div> 
       <div class="Part_Content_right"> 
        <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
       </div> 
       </div> 
       <div class="Part_Footer"> 
       <button>Show <i class="fa fa-caret-down"></i></button> 
       </div> 
      </div> 
      <div class="Part"> 
       <div class="Part_Header"> 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
       </div> 
       <div class="Part_Content"> 
       <div class="Part_Content_Left"> 
        <a href="#">Link 1</a> 
        <a href="#">Link 2</a> 
       </div> 
       <div class="Part_Content_right"> 
        <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
       </div> 
       </div> 
       <div class="Part_Footer"> 
       <button>Show <i class="fa fa-caret-down"></i></button> 
       </div> 
      </div> 
      <div class="Part"> 
       <div class="Part_Header"> 
       <span>Title<a href="#"><i class="fa fa-ellipsis-h"></i></a></span> 
       </div> 
       <div class="Part_Content"> 
       <div class="Part_Content_Left"> 
        <a href="#">Link 1</a> 
        <a href="#">Link 2</a> 
       </div> 
       <div class="Part_Content_right"> 
        <img src="https://www.maltbazaren.dk/images/staal-300x300-t.png" /> 
       </div> 
       </div> 
       <div class="Part_Footer"> 
       <button>Show <i class="fa fa-caret-down"></i></button> 
       </div> 
      </div> 

      </div> 
     </div> 
     </div> 
    </div> 
+0

。sub_partセクションの幅を調整します。 –

+0

Tarunはsub_partが親の下に中央に配置されていません –

+0

はい、私は知っていますが、コンテナの幅を広げたくありません。 –

関連する問題