Skip to main content
3 of 3
added 797 characters in body

two div horizontally when one div is disable another should take the whole space 100% width in Magento 2

I have two div's horizontally in one div there is Instagram feed plugin and another is the newsletter, now when Instagram feed plugin is disabled then newsletter should come in the whole space in Magento 2. enter image description here as you can see in the image now when Instagram feed is disabled hello should take the whole space

code to set width

<head>
<link rel="stylesheet" type="text/css" 
 href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/
 bootstrap.mi 
 n.css">
</head>
 <div>
<div class="row">
<div id="main1" class="col-md-6" style="border: 1px solid red;box- 
 sizing: border-box;">
    <h1>hello</h1>
</div>
<div id="main2" class="col-md-6" style="border: 1px solid black;box-sizing: border-box;">
    <h1>hello</h1>
</div>
</div>
</div>
 <script type="text/javascript">
   var main1 = document.getElementById('main1');
     var main2 = document.getElementById('main2');

   //main1.style.display = 'none';
   if(main1.style.display == "none")
      main2.className = "col-md-12";

    // if (true) {} else {}
 </script>