Note that there are some explanatory texts on larger screens.

plurals
  1. POCss issue in product grid for an ecommerce
    primarykey
    data
    text
    <p>How to fix the problem in following image in css (I am new to css/html)</p> <p><img src="https://i.stack.imgur.com/Tp7cz.png" alt="Product List"></p> <p>The problem is if product label is too long, <code>add button</code> slides down. And if label is short it slides up. </p> <p>Here is css and html.</p> <pre><code>&lt;div class="product-container"&gt; &lt;a href="#" class="thumbnail"&gt;&lt;img src="img/sample_prod.jpeg" alt="Product name" class="ProductTopCell img-rounded"&gt;&lt;/a&gt; &lt;div class="product-container-bottom"&gt; &lt;p class="product-label"&gt;&lt;a href="#"&gt;Buxted Free Range Skinless Chicken Breast Fillets (430g)&lt;/a&gt;&lt;/p&gt; &lt;p style="font-weight:600"&gt;Rs 43&lt;small&gt;/Kg&lt;/small&gt;&lt;/p&gt; &lt;div class="product-add-button"&gt;&lt;span class="quantity-cell"&gt;qty &lt;input type="number" class="quantity-number-cell" value="1"&gt; kg&lt;/span&gt;&lt;button class="btn btn-primary" type="button"&gt;Add&lt;/button&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="product-container"&gt; &lt;a href="#" class="thumbnail"&gt;&lt;img src="img/sample_prod.jpeg" alt="Product name" class="ProductTopCell img-rounded"&gt;&lt;/a&gt; &lt;div class="product-container-bottom"&gt; &lt;p class="product-label"&gt;&lt;a href="#"&gt;Buxted Free Range Range Rang Skinless Chicken Breast Fillets (430g)&lt;/a&gt;&lt;/p&gt; &lt;p style="font-weight:600"&gt;Rs 43&lt;small&gt;/Kg&lt;/small&gt;&lt;/p&gt; &lt;div class="product-add-button"&gt;&lt;span class="quantity-cell"&gt;qty &lt;input type="number" class="quantity-number-cell" value="1"&gt; kg&lt;/span&gt;&lt;button class="btn btn-primary" type="button"&gt;Add&lt;/button&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="product-container"&gt; &lt;a href="#" class="thumbnail"&gt;&lt;img src="img/sample_prod.jpeg" alt="Product name" class="ProductTopCell img-rounded"&gt;&lt;/a&gt; &lt;div class="product-container-bottom"&gt; &lt;p class="product-label"&gt;&lt;a href="#"&gt; Breast Fillets (430g)&lt;/a&gt;&lt;/p&gt; &lt;p style="font-weight:600"&gt;Rs 43&lt;small&gt;/Kg&lt;/small&gt;&lt;/p&gt; &lt;div class="product-add-button"&gt;&lt;span class="quantity-cell"&gt;qty &lt;input type="number" class="quantity-number-cell" value="1"&gt; kg&lt;/span&gt;&lt;button class="btn btn-primary" type="button"&gt;Add&lt;/button&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; .product-container .thumbnail { background: none; border: none; padding-bottom: 10px; box-shadow: none; } .product-container { border-bottom: 1px solid #C2BEB7; width: 172px; padding: 0 5px 15px 5px; display: inline-block; margin-bottom: 15px; height: 280px; vertical-align: top; } .product-container-bottom { background-image: url(img/Dotted-line.gif); background-position: top; background-repeat: repeat-x; padding-top: 10px; vertical-align: bottom; overflow: hidden; } .product-label { line-height: 14px; text-align: left; font-size: 13px; direction: ltr; } .product-label a { color: #004B91; } .product-add-button { margin-top:3px; text-align:right; vertical-align:baseline; } .quantity-cell { font-size:12px; vertical-align:bottom; margin-bottom: 0px; padding-right:7px; } .quantity-number-cell { width:30px; font-size:13px; height:90%; margin-bottom: 0px !important; padding-bottom:1px; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload