<div> help

Joined
Mar 4, 2024
Messages
1
Reaction score
0
I'm trying to get two items to show in a row, where when it is more populated they will show 3 items across. Currently I'm having trouble getting this to display properly and I can't figure out what <div> or </div> changes are needed. Can someone assist?

<section class="inner padded">
<h2 class="title caps txt-blue-dark">AWARD NOMINEES</h2>

<div class="accordion-wrapper">
<div class="accordion"><input id="hardwareNoms" name="radio-a" type="radio" /> <label class="accordion-label" for="hardwareNoms">Hardware Nominees</label>

<div class="accordion-content">
<p class="center">Check back soon for more nominees</p>

<p>&nbsp;</p>

<div class="gridrow">
<div class="gridcol four nominee">
<div class="nominee-img"><img alt="Framos's FSM:GO product submission for the A3 Innovation Awards" src="/userAssets/image/FSMGO.png" /></div>

<div class="nominee-info">
<p><span class="name">FSM:GO</span><br />
Framos</p>

<p style="margin-bottom: 5px"><a class="btn" href="https://www.framos.com/en/fsmgo" target="_blank">View Product</a></p>

<p><a class="btn" href="https://www.show.com/exhibitors/framos-technologies-inc" target="_blank">View Exhibitor</a></p>
</div>
</div>
</div>

<div class="gridcol four nominee">
<div class="nominee-img"><img alt="AMD Embedded+ Architecture" src="/userAssets/image/AMD_award.jpg" /></div>

<div class="nominee-info">
<p><span class="name">AMD Embedded+ Architecture</span><br />
AMD - Advance Micro Devices, Inc.</p>

<p style="margin-bottom: 5px"><a class="btn" href="https://www.amd.com/en/products/embedded/embedded-plus.html" target="_blank">View Product</a></p>

<p><a class="btn" href="https://www.show.com/exhibitors/advanced-micro-devices-inc-amd" target="_blank">View Exhibitor</a></p>
</div>
</div>
</div>
</div>

<div class="accordion"><input id="softwareNoms" name="radio-a" type="radio" /> <label class="accordion-label" for="softwareNoms">Software Nominees</label>

<div class="accordion-content">
<p class="center">Check back soon for more nominees</p>
</div>
</div>

<div class="accordion"><input id="systemsNoms" name="radio-a" type="radio" /> <label class="accordion-label" for="systemsNoms">Systems Nominees</label>

<div class="accordion-content">
<p class="center">Check back soon for more nominees</p>
</div>
</div>
</div>
</section>
 
Joined
Jul 4, 2023
Messages
370
Reaction score
41
BTW, you can write your code in a that way which makes it easier to read
HTML:
<section class="inner padded">
  <h2 class="title caps txt-blue-dark">AWARD NOMINEES</h2>

  <div class="accordion-wrapper">
    <div class="accordion">
      <input id="hardwareNoms" name="radio-a" type="radio" />
      <label class="accordion-label" for="hardwareNoms">Hardware Nominees</label>

      <div class="accordion-content">
        <p class="center">Check back soon for more nominees</p>

        <p>&nbsp;</p>

        <div class="gridrow">
          <div class="gridcol four nominee">
            <div class="nominee-img">
              <img alt="Framos's FSM:GO product submission for the A3 Innovation Awards" src="/userAssets/image/FSMGO.png" />
            </div>

            <div class="nominee-info">
              <p>
                <span class="name">FSM:GO</span><br />
                Framos
              </p>

              <p style="margin-bottom: 5px">
                <a class="btn"
                   href="https://www.framos.com/en/fsmgo" target="_blank">View Product</a>
              </p>

              <p>
                <a class="btn"
                   href="https://www.show.com/exhibitors/framos-technologies-inc" target="_blank">View Exhibitor</a>
              </p>
            </div>
          </div>
        </div>

        <div class="gridcol four nominee">
          <div class="nominee-img">
            <img alt="AMD Embedded+ Architecture" src="/userAssets/image/AMD_award.jpg" />
          </div>

          <div class="nominee-info">
            <p>
              <span class="name">AMD Embedded+ Architecture</span><br />
              AMD - Advance Micro Devices, Inc.
            </p>

            <p style="margin-bottom: 5px">
              <a class="btn"
                 href="https://www.amd.com/en/products/embedded/embedded-plus.html" target="_blank">View Product</a>
            </p>

            <p>
              <a class="btn"
                 href="https://www.show.com/exhibitors/advanced-micro-devices-inc-amd" target="_blank">View Exhibitor</a>                     </p>
          </div>
        </div>
      </div>
    </div>

    <div class="accordion">
      <input id="softwareNoms" name="radio-a" type="radio" />
      <label class="accordion-label" for="softwareNoms">Software Nominees</label>

      <div class="accordion-content">
        <p class="center">Check back soon for more nominees</p>
      </div>
    </div>

    <div class="accordion">
      <input id="systemsNoms" name="radio-a" type="radio" />
      <label class="accordion-label" for="systemsNoms">Systems Nominees</label>

      <div class="accordion-content">
        <p class="center">Check back soon for more nominees</p>
      </div>
    </div>
  </div>
</section>

have you tried using flex
[ working code on-line ]
CSS:
.accordion-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,286
Latest member
ChristieSo

Latest Threads

Top