<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamically positioning a card button based on the card height in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268762#M5611</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/505985"&gt;@ShaunLakeAWE&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I can help you a little bit with keeping the buttons at the bottom of the cards; however, you may still observe some height unbalance at the tablet viewport. Unfortunately, our grid system still relies on floats, so it's difficult to make cards maintain the same height when they are reflowing.&lt;BR /&gt;&lt;BR /&gt;Within the &amp;lt;style&amp;gt; tags, you want to add this:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;.card-content {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;justify-content: space-between;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;This will evenly distribute available space between the &amp;lt;h4&amp;gt;, the &amp;lt;p&amp;gt;, and the &amp;lt;a&amp;gt; (button). If you prefer your headings and paragraph text to remain more top aligned, you can choose to wrap the &amp;lt;h4&amp;gt; and &amp;lt;p&amp;gt; tags in a &amp;lt;div&amp;gt; which will change the space distribution to being distributed between two elements: the div container and the button.&lt;BR /&gt;&lt;BR /&gt;Hopefully this gets you a little further in your goals.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2023 20:57:00 GMT</pubDate>
    <dc:creator>KlaraSchmitt</dc:creator>
    <dc:date>2023-03-16T20:57:00Z</dc:date>
    <item>
      <title>Dynamically positioning a card button based on the card height</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268400#M5604</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I am running into a problem where I set a fixed height for a number of cards displayed in a row (to accommodate different text block lengths or headings that run over two lines), but the button doesn't shift downwards with the bottom edge of the card when its length is changed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-16 163526.png" style="width: 764px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/65424i63C1D472FF74FDA9/image-dimensions/764x337?v=v2" width="764" height="337" role="button" title="Screenshot 2023-03-16 163526.png" alt="Screenshot 2023-03-16 163526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can get the button to sit at the bottom of the card by modifying the card and button elements via CSS properties, but this interferes with the button itself (changing its width and aligning it to the cards left edge), and the button will either overlap or abut the card text when the viewport is collapsed.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-16 163209.png" style="width: 754px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/65426iC9087A7F5594D23C/image-dimensions/754x336?v=v2" width="754" height="336" role="button" title="Screenshot 2023-03-16 163209.png" alt="Screenshot 2023-03-16 163209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-16 164152.png" style="width: 573px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/65427i56F81DA21E15EE66/image-dimensions/573x457?v=v2" width="573" height="457" role="button" title="Screenshot 2023-03-16 164152.png" alt="Screenshot 2023-03-16 164152.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This isn't great, and I was hoping there is a method for shifting the button to the bottom of the card without having to fix it in place - an option to keep the button position responsive, so it automatically adjusts/flows with the rest of the card content when the card is resized.&lt;/P&gt;&lt;P&gt;Ideally (if at all possible), the button position would adjust to the bottom of the card dynamically whenever the card height value is changed (which may be often depending on updated card content length).&lt;/P&gt;&lt;P&gt;The HTML I'm using when trying to get this to work is attached for reference.&lt;/P&gt;&lt;P&gt;Hopefully someone's run into this problem before or is able to shed some light - any assistance would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;style&amp;gt;
  .card-base {
    /*position: relative;*/
    min-height: 350px;
  }

  .btn-card {
    /*position: absolute;*/
    /*bottom: 20px;*/
    background-color: #083A42;
    border-color: #083A42;
    color: #ffffff;
    height: 38px;

  .btn-card:hover,
  .btn-card:focus {
    background-color: #214e55;
    border-color: #214e55;
    color: #ffffff;
  }

&amp;lt;/style&amp;gt;
       
&amp;lt;div class="row row-one"&amp;gt;

  &amp;lt;!--Card One--&amp;gt;
  &amp;lt;div class="col-xs-12 col-sm-6 col-md-3"&amp;gt;
    &amp;lt;div class="calcite-web"&amp;gt;
      &amp;lt;div class="card-base"&amp;gt;
        &amp;lt;div class="card-image-wrap"&amp;gt;
          &amp;lt;img class="card-image" src="https://s3.amazonaws.com/geohub-assets/templates/sites/defaultSite/resources/story-map-editor.jpg" alt="Story Maps Cascade"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card-content"&amp;gt;
          &amp;lt;h4&amp;gt;Card&amp;lt;br&amp;gt;One&amp;lt;/h4&amp;gt;
          &amp;lt;p style="min-height: 50px"&amp;gt;Tell stories about local issues and solutions.&amp;lt;/p&amp;gt;
          &amp;lt;a style="text-decoration: none;" href="#" class="btn btn-card btn-primary" role="button"&amp;gt;Explore&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div style="clear: both;"&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- added to clear any floats --&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;!--Card Two--&amp;gt;
  &amp;lt;div class="col-xs-12 col-sm-6 col-md-3"&amp;gt;
    &amp;lt;div class="calcite-web"&amp;gt;
      &amp;lt;div class="card-base"&amp;gt;
        &amp;lt;div class="card-image-wrap"&amp;gt;
          &amp;lt;img class="card-image" src="https://s3.amazonaws.com/geohub-assets/templates/sites/defaultSite/resources/story-map-editor.jpg" alt="Story Maps Cascade"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card-content"&amp;gt;
          &amp;lt;h4&amp;gt;Card Two&amp;lt;/h4&amp;gt;
          &amp;lt;p style="min-height: 50px"&amp;gt;Tell stories about local issues and solutions.&amp;lt;/p&amp;gt;
          &amp;lt;a style="text-decoration: none;" href="#" class="btn btn-card btn-primary" role="button"&amp;gt;Explore&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div style="clear: both;"&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- added to clear any floats --&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  
    &amp;lt;!--Card Three--&amp;gt;
  &amp;lt;div class="col-xs-12 col-sm-6 col-md-3"&amp;gt;
    &amp;lt;div class="calcite-web"&amp;gt;
      &amp;lt;div class="card-base"&amp;gt;
        &amp;lt;div class="card-image-wrap"&amp;gt;
          &amp;lt;img class="card-image" src="https://s3.amazonaws.com/geohub-assets/templates/sites/defaultSite/resources/story-map-editor.jpg" alt="Story Maps Cascade"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card-content"&amp;gt;
          &amp;lt;h4&amp;gt;Card Three&amp;lt;/h4&amp;gt;
          &amp;lt;p style="min-height: 50px"&amp;gt;Tell stories about local issues.&amp;lt;/p&amp;gt;
          &amp;lt;a style="text-decoration: none;" href="#" class="btn btn-card btn-primary" role="button"&amp;gt;Explore&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div style="clear: both;"&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- added to clear any floats --&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

&amp;lt;/div&amp;gt;&amp;lt;!--row-one--&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 06:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268400#M5604</guid>
      <dc:creator>ShaunLakeAWE</dc:creator>
      <dc:date>2023-03-16T06:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically positioning a card button based on the card height</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268762#M5611</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/505985"&gt;@ShaunLakeAWE&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I can help you a little bit with keeping the buttons at the bottom of the cards; however, you may still observe some height unbalance at the tablet viewport. Unfortunately, our grid system still relies on floats, so it's difficult to make cards maintain the same height when they are reflowing.&lt;BR /&gt;&lt;BR /&gt;Within the &amp;lt;style&amp;gt; tags, you want to add this:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;.card-content {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;justify-content: space-between;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;This will evenly distribute available space between the &amp;lt;h4&amp;gt;, the &amp;lt;p&amp;gt;, and the &amp;lt;a&amp;gt; (button). If you prefer your headings and paragraph text to remain more top aligned, you can choose to wrap the &amp;lt;h4&amp;gt; and &amp;lt;p&amp;gt; tags in a &amp;lt;div&amp;gt; which will change the space distribution to being distributed between two elements: the div container and the button.&lt;BR /&gt;&lt;BR /&gt;Hopefully this gets you a little further in your goals.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:57:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268762#M5611</guid>
      <dc:creator>KlaraSchmitt</dc:creator>
      <dc:date>2023-03-16T20:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically positioning a card button based on the card height</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268793#M5612</link>
      <description>&lt;P&gt;Hi Klara,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just what I was after - thank you! I appreciate the quick response as well as the tip about wrapping the headings and paragraphs in a separate div to maintain the standard spacing between them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 21:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/dynamically-positioning-a-card-button-based-on-the/m-p/1268793#M5612</guid>
      <dc:creator>ShaunLakeAWE</dc:creator>
      <dc:date>2023-03-16T21:59:33Z</dc:date>
    </item>
  </channel>
</rss>

