Display items in 3 columns and 3 rows using css Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How to arrange images 3x3?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSMake the cursor a hand when a user hovers over a list itemHow can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?

Do I really need to have a message in a novel to appeal to readers?

The Nth Gryphon Number

Google .dev domain strangely redirects to https

Is there hard evidence that the grant peer review system performs significantly better than random?

What does this say in Elvish?

BITCOIN: on a chart what does it mean for the USD price to be higher then marketcap?

Random body shuffle every night—can we still function?

Can two person see the same photon?

How to force a browser when connecting to a specific domain to be https only using only the client machine?

One-one communication

RSA find public exponent

What order were files/directories output in dir?

Resize vertical bars (absolute-value symbols)

Test print coming out spongy

Understanding p-Values using an example

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

New Order #6: Easter Egg

How would a mousetrap for use in space work?

How much damage would a cupful of neutron star matter do to the Earth?

retrieve food groups from food item list

Connecting Mac Book Pro 2017 to 2 Projectors via USB C

Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?

"klopfte jemand" or "jemand klopfte"?

What is the difference between CTSS and ITS?



Display items in 3 columns and 3 rows using css



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How to arrange images 3x3?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSMake the cursor a hand when a user hovers over a list itemHow can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















How can I make a 3x3 display of data? I am displaying data using foreach loop and this is the output:
enter image description here



This is my blade.php code



<div class="coupon_div">
@foreach($coupons as $coupon)
<div class="column coupon_col">
<div class="coupon_cont pad">
<div class="coupon_details">
<h3 class="column_title coupon_title">
<span class="bullets">◼ </span>
$coupon->name
</h3>
<p class="column_text coupon_text"> $coupon->description </p>
<button class="btn_gold btn-coupon" type="button" name="button" onclick="window.open(' $coupon->file_path ')"> Open </button>
</div>
</div>
</div>
@endforeach
</div>


my css



.coupon_div 
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 5px;

.column
width: 345px;
height: auto;
background-color: white;
position: relative;

.coupon_col
padding: 0;
margin-bottom: 30px;

.coupon_cont
width: 345px;

.coupon_col .pad
padding: 0;

.coupon_details
padding: 32px;
border: 1px solid #dcdcdc;



If I display 3 items only, it has the proper spacing. My expected output is somehow like this:



enter image description here



How can I possibly attain this result using css? because as the result shows, it displays data in 1 line only. I found some almost the same problem here but somehow can't make it work.










share|improve this question

















  • 1





    You can use CSS grid system.

    – Ajay Sivan
    Mar 22 at 12:09

















1















How can I make a 3x3 display of data? I am displaying data using foreach loop and this is the output:
enter image description here



This is my blade.php code



<div class="coupon_div">
@foreach($coupons as $coupon)
<div class="column coupon_col">
<div class="coupon_cont pad">
<div class="coupon_details">
<h3 class="column_title coupon_title">
<span class="bullets">◼ </span>
$coupon->name
</h3>
<p class="column_text coupon_text"> $coupon->description </p>
<button class="btn_gold btn-coupon" type="button" name="button" onclick="window.open(' $coupon->file_path ')"> Open </button>
</div>
</div>
</div>
@endforeach
</div>


my css



.coupon_div 
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 5px;

.column
width: 345px;
height: auto;
background-color: white;
position: relative;

.coupon_col
padding: 0;
margin-bottom: 30px;

.coupon_cont
width: 345px;

.coupon_col .pad
padding: 0;

.coupon_details
padding: 32px;
border: 1px solid #dcdcdc;



If I display 3 items only, it has the proper spacing. My expected output is somehow like this:



enter image description here



How can I possibly attain this result using css? because as the result shows, it displays data in 1 line only. I found some almost the same problem here but somehow can't make it work.










share|improve this question

















  • 1





    You can use CSS grid system.

    – Ajay Sivan
    Mar 22 at 12:09













1












1








1








How can I make a 3x3 display of data? I am displaying data using foreach loop and this is the output:
enter image description here



This is my blade.php code



<div class="coupon_div">
@foreach($coupons as $coupon)
<div class="column coupon_col">
<div class="coupon_cont pad">
<div class="coupon_details">
<h3 class="column_title coupon_title">
<span class="bullets">◼ </span>
$coupon->name
</h3>
<p class="column_text coupon_text"> $coupon->description </p>
<button class="btn_gold btn-coupon" type="button" name="button" onclick="window.open(' $coupon->file_path ')"> Open </button>
</div>
</div>
</div>
@endforeach
</div>


my css



.coupon_div 
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 5px;

.column
width: 345px;
height: auto;
background-color: white;
position: relative;

.coupon_col
padding: 0;
margin-bottom: 30px;

.coupon_cont
width: 345px;

.coupon_col .pad
padding: 0;

.coupon_details
padding: 32px;
border: 1px solid #dcdcdc;



If I display 3 items only, it has the proper spacing. My expected output is somehow like this:



enter image description here



How can I possibly attain this result using css? because as the result shows, it displays data in 1 line only. I found some almost the same problem here but somehow can't make it work.










share|improve this question














How can I make a 3x3 display of data? I am displaying data using foreach loop and this is the output:
enter image description here



This is my blade.php code



<div class="coupon_div">
@foreach($coupons as $coupon)
<div class="column coupon_col">
<div class="coupon_cont pad">
<div class="coupon_details">
<h3 class="column_title coupon_title">
<span class="bullets">◼ </span>
$coupon->name
</h3>
<p class="column_text coupon_text"> $coupon->description </p>
<button class="btn_gold btn-coupon" type="button" name="button" onclick="window.open(' $coupon->file_path ')"> Open </button>
</div>
</div>
</div>
@endforeach
</div>


my css



.coupon_div 
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 5px;

.column
width: 345px;
height: auto;
background-color: white;
position: relative;

.coupon_col
padding: 0;
margin-bottom: 30px;

.coupon_cont
width: 345px;

.coupon_col .pad
padding: 0;

.coupon_details
padding: 32px;
border: 1px solid #dcdcdc;



If I display 3 items only, it has the proper spacing. My expected output is somehow like this:



enter image description here



How can I possibly attain this result using css? because as the result shows, it displays data in 1 line only. I found some almost the same problem here but somehow can't make it work.







css laravel-blade






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 11:47









Eem JeeEem Jee

301418




301418







  • 1





    You can use CSS grid system.

    – Ajay Sivan
    Mar 22 at 12:09












  • 1





    You can use CSS grid system.

    – Ajay Sivan
    Mar 22 at 12:09







1




1





You can use CSS grid system.

– Ajay Sivan
Mar 22 at 12:09





You can use CSS grid system.

– Ajay Sivan
Mar 22 at 12:09












1 Answer
1






active

oldest

votes


















0














Thanks for the your answer :) I have figured it out. I just removed some part of coupon_div class from:



.coupon_div 
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 5px;



To:



.coupon_div 
justify-content: space-between;
margin-bottom: 5px;



And added some checking:



<div class="column coupon_col $key % 3 == 1 ? 'addmargin' : '' ">


So if the item is on the 2nd, 5th and 7th, it will have a margin to its other 2 items.



.addmargin 
margin: 0px 15px;



With this now, I'm able to get my desired result.






share|improve this answer























    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',
    autoActivateHeartbeat: false,
    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%2f55298920%2fdisplay-items-in-3-columns-and-3-rows-using-css%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Thanks for the your answer :) I have figured it out. I just removed some part of coupon_div class from:



    .coupon_div 
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;



    To:



    .coupon_div 
    justify-content: space-between;
    margin-bottom: 5px;



    And added some checking:



    <div class="column coupon_col $key % 3 == 1 ? 'addmargin' : '' ">


    So if the item is on the 2nd, 5th and 7th, it will have a margin to its other 2 items.



    .addmargin 
    margin: 0px 15px;



    With this now, I'm able to get my desired result.






    share|improve this answer



























      0














      Thanks for the your answer :) I have figured it out. I just removed some part of coupon_div class from:



      .coupon_div 
      width: 100%;
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;



      To:



      .coupon_div 
      justify-content: space-between;
      margin-bottom: 5px;



      And added some checking:



      <div class="column coupon_col $key % 3 == 1 ? 'addmargin' : '' ">


      So if the item is on the 2nd, 5th and 7th, it will have a margin to its other 2 items.



      .addmargin 
      margin: 0px 15px;



      With this now, I'm able to get my desired result.






      share|improve this answer

























        0












        0








        0







        Thanks for the your answer :) I have figured it out. I just removed some part of coupon_div class from:



        .coupon_div 
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;



        To:



        .coupon_div 
        justify-content: space-between;
        margin-bottom: 5px;



        And added some checking:



        <div class="column coupon_col $key % 3 == 1 ? 'addmargin' : '' ">


        So if the item is on the 2nd, 5th and 7th, it will have a margin to its other 2 items.



        .addmargin 
        margin: 0px 15px;



        With this now, I'm able to get my desired result.






        share|improve this answer













        Thanks for the your answer :) I have figured it out. I just removed some part of coupon_div class from:



        .coupon_div 
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;



        To:



        .coupon_div 
        justify-content: space-between;
        margin-bottom: 5px;



        And added some checking:



        <div class="column coupon_col $key % 3 == 1 ? 'addmargin' : '' ">


        So if the item is on the 2nd, 5th and 7th, it will have a margin to its other 2 items.



        .addmargin 
        margin: 0px 15px;



        With this now, I'm able to get my desired result.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 12:01









        Eem JeeEem Jee

        301418




        301418





























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55298920%2fdisplay-items-in-3-columns-and-3-rows-using-css%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

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해