Problem with spacing between two rows - HTML template











up vote
0
down vote

favorite












I am having a issue with spacing between two rows/elements in a HTML template. I am trying to create a grid for the products in our restaurant and downloaded a template from the Internet. As you can see in this picture:
issue1



I am having issues with spacing between the first line and second line elements when trying to add a new row into the text. The rows were added with the p element and when doing that, the whole entire 2nd row just goes down by so much space.



This is the HTML i'm using (issue version vs. non-issue version)



                <div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30">
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
<div class="receipe-content">
<h5 style="line-height: 0px;">Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400; line-height: 0px;"> REDUCERE 10% - 12,00 RON</p>
</div>
</div>
</div>

<!-- Single Best Receipe Area -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30" >
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
<div class="receipe-content">
<a href="receipe-post.html">
<h5>Barilla - Spaghetti fără gluten 400g</h5>
</a>
</div>
</div>
</div>


And below is the custom CSS I've added:



.single-best-receipe-area .receipe-content {
padding-top: 30px;
text-align: center;
}
.mb-30 {
vertical-align: middle;
margin: 0 auto;
}
.receipe-content {
line-height: 0px;
}


As you can see, I've tried what I found here on stackoverflow with using line-height:0px but with no succes.
I am not web developer unfortunately and just trying to create a menu list for our restaurant. Help would be much appreciated.
Thank you!



EDIT: Demo with code: http://hanulsiminica.ro/test/menu.html



EDIT2: More representative image of the issue: issue2










share|improve this question
























  • Can you add a working snippet or jsfiddle for regenerate your problem
    – Nidhi
    Nov 20 at 11:59












  • I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
    – Iulian Oancea
    Nov 20 at 12:36










  • This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
    – Nidhi
    Nov 20 at 12:50










  • Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
    – Iulian Oancea
    Nov 20 at 12:57

















up vote
0
down vote

favorite












I am having a issue with spacing between two rows/elements in a HTML template. I am trying to create a grid for the products in our restaurant and downloaded a template from the Internet. As you can see in this picture:
issue1



I am having issues with spacing between the first line and second line elements when trying to add a new row into the text. The rows were added with the p element and when doing that, the whole entire 2nd row just goes down by so much space.



This is the HTML i'm using (issue version vs. non-issue version)



                <div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30">
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
<div class="receipe-content">
<h5 style="line-height: 0px;">Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400; line-height: 0px;"> REDUCERE 10% - 12,00 RON</p>
</div>
</div>
</div>

<!-- Single Best Receipe Area -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30" >
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
<div class="receipe-content">
<a href="receipe-post.html">
<h5>Barilla - Spaghetti fără gluten 400g</h5>
</a>
</div>
</div>
</div>


And below is the custom CSS I've added:



.single-best-receipe-area .receipe-content {
padding-top: 30px;
text-align: center;
}
.mb-30 {
vertical-align: middle;
margin: 0 auto;
}
.receipe-content {
line-height: 0px;
}


As you can see, I've tried what I found here on stackoverflow with using line-height:0px but with no succes.
I am not web developer unfortunately and just trying to create a menu list for our restaurant. Help would be much appreciated.
Thank you!



EDIT: Demo with code: http://hanulsiminica.ro/test/menu.html



EDIT2: More representative image of the issue: issue2










share|improve this question
























  • Can you add a working snippet or jsfiddle for regenerate your problem
    – Nidhi
    Nov 20 at 11:59












  • I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
    – Iulian Oancea
    Nov 20 at 12:36










  • This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
    – Nidhi
    Nov 20 at 12:50










  • Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
    – Iulian Oancea
    Nov 20 at 12:57















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am having a issue with spacing between two rows/elements in a HTML template. I am trying to create a grid for the products in our restaurant and downloaded a template from the Internet. As you can see in this picture:
issue1



I am having issues with spacing between the first line and second line elements when trying to add a new row into the text. The rows were added with the p element and when doing that, the whole entire 2nd row just goes down by so much space.



This is the HTML i'm using (issue version vs. non-issue version)



                <div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30">
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
<div class="receipe-content">
<h5 style="line-height: 0px;">Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400; line-height: 0px;"> REDUCERE 10% - 12,00 RON</p>
</div>
</div>
</div>

<!-- Single Best Receipe Area -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30" >
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
<div class="receipe-content">
<a href="receipe-post.html">
<h5>Barilla - Spaghetti fără gluten 400g</h5>
</a>
</div>
</div>
</div>


And below is the custom CSS I've added:



.single-best-receipe-area .receipe-content {
padding-top: 30px;
text-align: center;
}
.mb-30 {
vertical-align: middle;
margin: 0 auto;
}
.receipe-content {
line-height: 0px;
}


As you can see, I've tried what I found here on stackoverflow with using line-height:0px but with no succes.
I am not web developer unfortunately and just trying to create a menu list for our restaurant. Help would be much appreciated.
Thank you!



EDIT: Demo with code: http://hanulsiminica.ro/test/menu.html



EDIT2: More representative image of the issue: issue2










share|improve this question















I am having a issue with spacing between two rows/elements in a HTML template. I am trying to create a grid for the products in our restaurant and downloaded a template from the Internet. As you can see in this picture:
issue1



I am having issues with spacing between the first line and second line elements when trying to add a new row into the text. The rows were added with the p element and when doing that, the whole entire 2nd row just goes down by so much space.



This is the HTML i'm using (issue version vs. non-issue version)



                <div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30">
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
<div class="receipe-content">
<h5 style="line-height: 0px;">Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400; line-height: 0px;"> REDUCERE 10% - 12,00 RON</p>
</div>
</div>
</div>

<!-- Single Best Receipe Area -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30" >
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
<div class="receipe-content">
<a href="receipe-post.html">
<h5>Barilla - Spaghetti fără gluten 400g</h5>
</a>
</div>
</div>
</div>


And below is the custom CSS I've added:



.single-best-receipe-area .receipe-content {
padding-top: 30px;
text-align: center;
}
.mb-30 {
vertical-align: middle;
margin: 0 auto;
}
.receipe-content {
line-height: 0px;
}


As you can see, I've tried what I found here on stackoverflow with using line-height:0px but with no succes.
I am not web developer unfortunately and just trying to create a menu list for our restaurant. Help would be much appreciated.
Thank you!



EDIT: Demo with code: http://hanulsiminica.ro/test/menu.html



EDIT2: More representative image of the issue: issue2







html css display spacing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 12:49

























asked Nov 20 at 11:24









Iulian Oancea

11




11












  • Can you add a working snippet or jsfiddle for regenerate your problem
    – Nidhi
    Nov 20 at 11:59












  • I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
    – Iulian Oancea
    Nov 20 at 12:36










  • This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
    – Nidhi
    Nov 20 at 12:50










  • Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
    – Iulian Oancea
    Nov 20 at 12:57




















  • Can you add a working snippet or jsfiddle for regenerate your problem
    – Nidhi
    Nov 20 at 11:59












  • I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
    – Iulian Oancea
    Nov 20 at 12:36










  • This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
    – Nidhi
    Nov 20 at 12:50










  • Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
    – Iulian Oancea
    Nov 20 at 12:57


















Can you add a working snippet or jsfiddle for regenerate your problem
– Nidhi
Nov 20 at 11:59






Can you add a working snippet or jsfiddle for regenerate your problem
– Nidhi
Nov 20 at 11:59














I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
– Iulian Oancea
Nov 20 at 12:36




I added a demo with the whole code here since it's a whole template and JSFiddle might not be really the best solution for that: hanulsiminica.ro/test/menu.html
– Iulian Oancea
Nov 20 at 12:36












This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
– Nidhi
Nov 20 at 12:50




This is an issue with bootstrap 3 grid try solutions like: stackoverflow.com/questions/19572753/…
– Nidhi
Nov 20 at 12:50












Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
– Iulian Oancea
Nov 20 at 12:57






Thank you Nidhi! Using the solution here: codeply.com/go/zNCNrNPb9f worked. Greatly appreciated!
– Iulian Oancea
Nov 20 at 12:57














3 Answers
3






active

oldest

votes

















up vote
0
down vote













Using just the code you've provided, changing the html to this to add a 'flex-height' class to the first div with current class of 'row':



<div class="row flex-height">
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30">
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
<div class="receipe-content">
<h5>Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400;"> REDUCERE 10% - 12,00 RON</p>
</div>
</div>
</div>

<!-- Single Best Receipe Area -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-best-receipe-area mb-30" >
<img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
<div class="receipe-content">
<a href="receipe-post.html">
<h5>Barilla - Spaghetti fără gluten 400g</h5>
</a>
</div>
</div>
</div>
</div>


And the CSS to this:



.single-best-receipe-area{
text-align:center;
line-height:30px;
padding-top:20px;
}
.receipe-content{
padding-top:30px;
}
.row.flex-height {
display: flex;
flex-wrap: wrap;
}
.row.flex-height > [class*='col-'] {
display: flex;
flex-direction: column;
}


Gives a better looking result. JSFiddle example here (try resizing your browser too, to see how it looks on smaller and larger screens) - New JSFiddle



Hope this helps.






share|improve this answer























  • Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
    – Iulian Oancea
    Nov 20 at 12:48












  • Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
    – Matt Reynolds
    Nov 20 at 13:05


















up vote
0
down vote














.card-img{
display: flex;
flex-wrap: wrap;
}

















Barilla - Penne Rigate fără gluten 400g 14,00 RON REDUCERE 10% - 12,00 RON










Barilla - Spaghetti fără gluten 400g









Barilla - Spaghetti fără gluten 400g









share|improve this answer




























    up vote
    0
    down vote













    <style>
    .single-best-receipe-area .receipe-content {
    padding-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    }
    </style>





    share|improve this answer























    • Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
      – Iulian Oancea
      Nov 20 at 12:34













    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391968%2fproblem-with-spacing-between-two-rows-html-template%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Using just the code you've provided, changing the html to this to add a 'flex-height' class to the first div with current class of 'row':



    <div class="row flex-height">
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30">
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <h5>Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400;"> REDUCERE 10% - 12,00 RON</p>
    </div>
    </div>
    </div>

    <!-- Single Best Receipe Area -->
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30" >
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <a href="receipe-post.html">
    <h5>Barilla - Spaghetti fără gluten 400g</h5>
    </a>
    </div>
    </div>
    </div>
    </div>


    And the CSS to this:



    .single-best-receipe-area{
    text-align:center;
    line-height:30px;
    padding-top:20px;
    }
    .receipe-content{
    padding-top:30px;
    }
    .row.flex-height {
    display: flex;
    flex-wrap: wrap;
    }
    .row.flex-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
    }


    Gives a better looking result. JSFiddle example here (try resizing your browser too, to see how it looks on smaller and larger screens) - New JSFiddle



    Hope this helps.






    share|improve this answer























    • Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
      – Iulian Oancea
      Nov 20 at 12:48












    • Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
      – Matt Reynolds
      Nov 20 at 13:05















    up vote
    0
    down vote













    Using just the code you've provided, changing the html to this to add a 'flex-height' class to the first div with current class of 'row':



    <div class="row flex-height">
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30">
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <h5>Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400;"> REDUCERE 10% - 12,00 RON</p>
    </div>
    </div>
    </div>

    <!-- Single Best Receipe Area -->
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30" >
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <a href="receipe-post.html">
    <h5>Barilla - Spaghetti fără gluten 400g</h5>
    </a>
    </div>
    </div>
    </div>
    </div>


    And the CSS to this:



    .single-best-receipe-area{
    text-align:center;
    line-height:30px;
    padding-top:20px;
    }
    .receipe-content{
    padding-top:30px;
    }
    .row.flex-height {
    display: flex;
    flex-wrap: wrap;
    }
    .row.flex-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
    }


    Gives a better looking result. JSFiddle example here (try resizing your browser too, to see how it looks on smaller and larger screens) - New JSFiddle



    Hope this helps.






    share|improve this answer























    • Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
      – Iulian Oancea
      Nov 20 at 12:48












    • Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
      – Matt Reynolds
      Nov 20 at 13:05













    up vote
    0
    down vote










    up vote
    0
    down vote









    Using just the code you've provided, changing the html to this to add a 'flex-height' class to the first div with current class of 'row':



    <div class="row flex-height">
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30">
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <h5>Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400;"> REDUCERE 10% - 12,00 RON</p>
    </div>
    </div>
    </div>

    <!-- Single Best Receipe Area -->
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30" >
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <a href="receipe-post.html">
    <h5>Barilla - Spaghetti fără gluten 400g</h5>
    </a>
    </div>
    </div>
    </div>
    </div>


    And the CSS to this:



    .single-best-receipe-area{
    text-align:center;
    line-height:30px;
    padding-top:20px;
    }
    .receipe-content{
    padding-top:30px;
    }
    .row.flex-height {
    display: flex;
    flex-wrap: wrap;
    }
    .row.flex-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
    }


    Gives a better looking result. JSFiddle example here (try resizing your browser too, to see how it looks on smaller and larger screens) - New JSFiddle



    Hope this helps.






    share|improve this answer














    Using just the code you've provided, changing the html to this to add a 'flex-height' class to the first div with current class of 'row':



    <div class="row flex-height">
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30">
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798850_001.jpg?_=1527527264626" width=290px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <h5>Barilla - Penne Rigate fără gluten 400g</h5> <p style="color:#ff9400; text-decoration: line-through;" >14,00 RON</p> <p style="color:#ff9400;"> REDUCERE 10% - 12,00 RON</p>
    </div>
    </div>
    </div>

    <!-- Single Best Receipe Area -->
    <div class="col-12 col-sm-6 col-lg-4">
    <div class="single-best-receipe-area mb-30" >
    <img src="https://www.coopathome.ch/img/produkte/880_880/RGB/4798854_001.jpg?_=1505902808944" width=320px height=304px alt="" class="center-block" />
    <div class="receipe-content">
    <a href="receipe-post.html">
    <h5>Barilla - Spaghetti fără gluten 400g</h5>
    </a>
    </div>
    </div>
    </div>
    </div>


    And the CSS to this:



    .single-best-receipe-area{
    text-align:center;
    line-height:30px;
    padding-top:20px;
    }
    .receipe-content{
    padding-top:30px;
    }
    .row.flex-height {
    display: flex;
    flex-wrap: wrap;
    }
    .row.flex-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
    }


    Gives a better looking result. JSFiddle example here (try resizing your browser too, to see how it looks on smaller and larger screens) - New JSFiddle



    Hope this helps.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 20 at 13:03

























    answered Nov 20 at 12:32









    Matt Reynolds

    1964




    1964












    • Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
      – Iulian Oancea
      Nov 20 at 12:48












    • Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
      – Matt Reynolds
      Nov 20 at 13:05


















    • Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
      – Iulian Oancea
      Nov 20 at 12:48












    • Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
      – Matt Reynolds
      Nov 20 at 13:05
















    Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
    – Iulian Oancea
    Nov 20 at 12:48






    Hello. Thank you for trying to help! I have tried your solution, but nothing changed. My issue is, as shown in the image I posted, the huge vertical gap between the product lines when adding new text using the p tag. When using just the h5 tag for 1 line of text, everything is fine, but when I try to add new text using the p tag the row below automatically creates that huge gap. EDIT: Added new image at bottom of main post with issue.
    – Iulian Oancea
    Nov 20 at 12:48














    Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
    – Matt Reynolds
    Nov 20 at 13:05




    Great solution from Nidhi - updated my JSFiddle but would vote up Nidhi's answer if I could!
    – Matt Reynolds
    Nov 20 at 13:05












    up vote
    0
    down vote














    .card-img{
    display: flex;
    flex-wrap: wrap;
    }

















    Barilla - Penne Rigate fără gluten 400g 14,00 RON REDUCERE 10% - 12,00 RON










    Barilla - Spaghetti fără gluten 400g









    Barilla - Spaghetti fără gluten 400g









    share|improve this answer

























      up vote
      0
      down vote














      .card-img{
      display: flex;
      flex-wrap: wrap;
      }

















      Barilla - Penne Rigate fără gluten 400g 14,00 RON REDUCERE 10% - 12,00 RON










      Barilla - Spaghetti fără gluten 400g









      Barilla - Spaghetti fără gluten 400g









      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote










        .card-img{
        display: flex;
        flex-wrap: wrap;
        }

















        Barilla - Penne Rigate fără gluten 400g 14,00 RON REDUCERE 10% - 12,00 RON










        Barilla - Spaghetti fără gluten 400g









        Barilla - Spaghetti fără gluten 400g









        share|improve this answer













        .card-img{
        display: flex;
        flex-wrap: wrap;
        }

















        Barilla - Penne Rigate fără gluten 400g 14,00 RON REDUCERE 10% - 12,00 RON










        Barilla - Spaghetti fără gluten 400g









        Barilla - Spaghetti fără gluten 400g










        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 13:07









        AddWeb Solution Pvt Ltd

        12.5k1735




        12.5k1735






















            up vote
            0
            down vote













            <style>
            .single-best-receipe-area .receipe-content {
            padding-top: 30px;
            text-align: center;
            display: flex;
            flex-direction: column;
            }
            </style>





            share|improve this answer























            • Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
              – Iulian Oancea
              Nov 20 at 12:34

















            up vote
            0
            down vote













            <style>
            .single-best-receipe-area .receipe-content {
            padding-top: 30px;
            text-align: center;
            display: flex;
            flex-direction: column;
            }
            </style>





            share|improve this answer























            • Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
              – Iulian Oancea
              Nov 20 at 12:34















            up vote
            0
            down vote










            up vote
            0
            down vote









            <style>
            .single-best-receipe-area .receipe-content {
            padding-top: 30px;
            text-align: center;
            display: flex;
            flex-direction: column;
            }
            </style>





            share|improve this answer














            <style>
            .single-best-receipe-area .receipe-content {
            padding-top: 30px;
            text-align: center;
            display: flex;
            flex-direction: column;
            }
            </style>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 20 at 13:07









            Olivier Krull

            784620




            784620










            answered Nov 20 at 12:04









            AddWeb Solution Pvt Ltd

            12.5k1735




            12.5k1735












            • Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
              – Iulian Oancea
              Nov 20 at 12:34




















            • Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
              – Iulian Oancea
              Nov 20 at 12:34


















            Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
            – Iulian Oancea
            Nov 20 at 12:34






            Hello, thanks for trying to help. Added the CSS but still not working, nothing changed. Might it be because I'm using the p tag? Do I have an alternative solution? EDIT: Added demo link.
            – Iulian Oancea
            Nov 20 at 12:34




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53391968%2fproblem-with-spacing-between-two-rows-html-template%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'