Grid column fr doesn't apply












0














I encountered a problem with my grid code. I would like to display two fields to each other. I created two 1fr 1fr and each field should take one fr. I tried even grid areas and somehow it doesn´t function, but still fields won´t align to grid.
Thank you very much. I'm thankful for any ideas you might have



//=========================================================================
// [1]Contact Form
.contact {
@include flexy (
$width:100%,
$dir: column,
);
grid-area: form;
display: grid;
grid-auto-columns: 1fr 1fr;
grid-auto-rows: auto;
grid-template-areas:
"form-heading form-heading"
"grid-form grid-form";
}
// Heading and Paragraph Text
.form-text {
@include flexy (
$dir: column,
);
grid-area: form-heading;
}
// Whole Form
.form {
@include flexy (
$width: 100%,
$just: center,
);
@include mg("md") {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
};

grid-area: grid-form;
}
// Each Field
.field {
@include flexy (
$dir: column,
$width: 100%,
);
padding: 5% 0 5% 0;
}
// ID for Grid
#grid-name {
grid-column: 1/2;
}
#grid-email {
grid-column: 2/3 ;
}
#grid-condition {

grid-column: 1/2;
}
#grid-price {

grid-column: 2/3;
}
#grid-company {

}
#grid-lease {

}
#grid-other {

}
#grid-message {

}
#grid-submit-btn {

}

<div class="contact">
<div class="form-text">
<h2>Get in touch</h2>
<p>Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem.</p>
</div>
<div class="form">
<form method="post" action="#">
<div class="field half" id="grid-name">
<label for="name">Name</label>
<input type="text" name="name" id="name"/>
</div>
<div class="field half" id="grid-email">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
<div class="field half" id="grid-condition">
<label for="condition">Condition</label>
<input type="text" name="text" id="condition" />
</div>
<div class="field half" id="grid-price">
<label for="price">Price</label>
<input type="text" name="price" id="price" />
</div>
<div class="field half" id="grid-company">
<label for="company">Company</label>
<input type="text" name="company" id="company" />
</div>
<div class="field half" id="grid-lease">
<label for="lease">Lease</label>
<input type="text" name="lease" id="lease" />
</div>
<div class="field half" id="grid-other">
<label for="other">Other</label>
<input type="text" name="other" id="other" />
</div>
<div class="field" id="grid-message">
<label for="message">Message</label>
<textarea name="message" id="message" rows="5"></textarea>
</div>
<ul class="actions">
<li><button class="btn-form" type="submit" id="submit-btn"> Send Message</button></li>
</ul>
</form>
</div>
</div>









share|improve this question
























  • you defined 1fr on column and you made each area to take both of them on each row
    – Temani Afif
    Dec 28 '18 at 9:49










  • What do you propose?
    – MasterMind
    Dec 28 '18 at 10:44










  • I have problem with aligning inputs in the form
    – MasterMind
    Dec 28 '18 at 10:55
















0














I encountered a problem with my grid code. I would like to display two fields to each other. I created two 1fr 1fr and each field should take one fr. I tried even grid areas and somehow it doesn´t function, but still fields won´t align to grid.
Thank you very much. I'm thankful for any ideas you might have



//=========================================================================
// [1]Contact Form
.contact {
@include flexy (
$width:100%,
$dir: column,
);
grid-area: form;
display: grid;
grid-auto-columns: 1fr 1fr;
grid-auto-rows: auto;
grid-template-areas:
"form-heading form-heading"
"grid-form grid-form";
}
// Heading and Paragraph Text
.form-text {
@include flexy (
$dir: column,
);
grid-area: form-heading;
}
// Whole Form
.form {
@include flexy (
$width: 100%,
$just: center,
);
@include mg("md") {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
};

grid-area: grid-form;
}
// Each Field
.field {
@include flexy (
$dir: column,
$width: 100%,
);
padding: 5% 0 5% 0;
}
// ID for Grid
#grid-name {
grid-column: 1/2;
}
#grid-email {
grid-column: 2/3 ;
}
#grid-condition {

grid-column: 1/2;
}
#grid-price {

grid-column: 2/3;
}
#grid-company {

}
#grid-lease {

}
#grid-other {

}
#grid-message {

}
#grid-submit-btn {

}

<div class="contact">
<div class="form-text">
<h2>Get in touch</h2>
<p>Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem.</p>
</div>
<div class="form">
<form method="post" action="#">
<div class="field half" id="grid-name">
<label for="name">Name</label>
<input type="text" name="name" id="name"/>
</div>
<div class="field half" id="grid-email">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
<div class="field half" id="grid-condition">
<label for="condition">Condition</label>
<input type="text" name="text" id="condition" />
</div>
<div class="field half" id="grid-price">
<label for="price">Price</label>
<input type="text" name="price" id="price" />
</div>
<div class="field half" id="grid-company">
<label for="company">Company</label>
<input type="text" name="company" id="company" />
</div>
<div class="field half" id="grid-lease">
<label for="lease">Lease</label>
<input type="text" name="lease" id="lease" />
</div>
<div class="field half" id="grid-other">
<label for="other">Other</label>
<input type="text" name="other" id="other" />
</div>
<div class="field" id="grid-message">
<label for="message">Message</label>
<textarea name="message" id="message" rows="5"></textarea>
</div>
<ul class="actions">
<li><button class="btn-form" type="submit" id="submit-btn"> Send Message</button></li>
</ul>
</form>
</div>
</div>









share|improve this question
























  • you defined 1fr on column and you made each area to take both of them on each row
    – Temani Afif
    Dec 28 '18 at 9:49










  • What do you propose?
    – MasterMind
    Dec 28 '18 at 10:44










  • I have problem with aligning inputs in the form
    – MasterMind
    Dec 28 '18 at 10:55














0












0








0







I encountered a problem with my grid code. I would like to display two fields to each other. I created two 1fr 1fr and each field should take one fr. I tried even grid areas and somehow it doesn´t function, but still fields won´t align to grid.
Thank you very much. I'm thankful for any ideas you might have



//=========================================================================
// [1]Contact Form
.contact {
@include flexy (
$width:100%,
$dir: column,
);
grid-area: form;
display: grid;
grid-auto-columns: 1fr 1fr;
grid-auto-rows: auto;
grid-template-areas:
"form-heading form-heading"
"grid-form grid-form";
}
// Heading and Paragraph Text
.form-text {
@include flexy (
$dir: column,
);
grid-area: form-heading;
}
// Whole Form
.form {
@include flexy (
$width: 100%,
$just: center,
);
@include mg("md") {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
};

grid-area: grid-form;
}
// Each Field
.field {
@include flexy (
$dir: column,
$width: 100%,
);
padding: 5% 0 5% 0;
}
// ID for Grid
#grid-name {
grid-column: 1/2;
}
#grid-email {
grid-column: 2/3 ;
}
#grid-condition {

grid-column: 1/2;
}
#grid-price {

grid-column: 2/3;
}
#grid-company {

}
#grid-lease {

}
#grid-other {

}
#grid-message {

}
#grid-submit-btn {

}

<div class="contact">
<div class="form-text">
<h2>Get in touch</h2>
<p>Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem.</p>
</div>
<div class="form">
<form method="post" action="#">
<div class="field half" id="grid-name">
<label for="name">Name</label>
<input type="text" name="name" id="name"/>
</div>
<div class="field half" id="grid-email">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
<div class="field half" id="grid-condition">
<label for="condition">Condition</label>
<input type="text" name="text" id="condition" />
</div>
<div class="field half" id="grid-price">
<label for="price">Price</label>
<input type="text" name="price" id="price" />
</div>
<div class="field half" id="grid-company">
<label for="company">Company</label>
<input type="text" name="company" id="company" />
</div>
<div class="field half" id="grid-lease">
<label for="lease">Lease</label>
<input type="text" name="lease" id="lease" />
</div>
<div class="field half" id="grid-other">
<label for="other">Other</label>
<input type="text" name="other" id="other" />
</div>
<div class="field" id="grid-message">
<label for="message">Message</label>
<textarea name="message" id="message" rows="5"></textarea>
</div>
<ul class="actions">
<li><button class="btn-form" type="submit" id="submit-btn"> Send Message</button></li>
</ul>
</form>
</div>
</div>









share|improve this question















I encountered a problem with my grid code. I would like to display two fields to each other. I created two 1fr 1fr and each field should take one fr. I tried even grid areas and somehow it doesn´t function, but still fields won´t align to grid.
Thank you very much. I'm thankful for any ideas you might have



//=========================================================================
// [1]Contact Form
.contact {
@include flexy (
$width:100%,
$dir: column,
);
grid-area: form;
display: grid;
grid-auto-columns: 1fr 1fr;
grid-auto-rows: auto;
grid-template-areas:
"form-heading form-heading"
"grid-form grid-form";
}
// Heading and Paragraph Text
.form-text {
@include flexy (
$dir: column,
);
grid-area: form-heading;
}
// Whole Form
.form {
@include flexy (
$width: 100%,
$just: center,
);
@include mg("md") {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
};

grid-area: grid-form;
}
// Each Field
.field {
@include flexy (
$dir: column,
$width: 100%,
);
padding: 5% 0 5% 0;
}
// ID for Grid
#grid-name {
grid-column: 1/2;
}
#grid-email {
grid-column: 2/3 ;
}
#grid-condition {

grid-column: 1/2;
}
#grid-price {

grid-column: 2/3;
}
#grid-company {

}
#grid-lease {

}
#grid-other {

}
#grid-message {

}
#grid-submit-btn {

}

<div class="contact">
<div class="form-text">
<h2>Get in touch</h2>
<p>Phasellus convallis elit id ullamcorper pulvinar. Duis aliquam turpis mauris, eu ultricies erat malesuada quis. Aliquam dapibus, lacus eget hendrerit bibendum, urna est aliquam sem, sit amet imperdiet est velit quis lorem.</p>
</div>
<div class="form">
<form method="post" action="#">
<div class="field half" id="grid-name">
<label for="name">Name</label>
<input type="text" name="name" id="name"/>
</div>
<div class="field half" id="grid-email">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
<div class="field half" id="grid-condition">
<label for="condition">Condition</label>
<input type="text" name="text" id="condition" />
</div>
<div class="field half" id="grid-price">
<label for="price">Price</label>
<input type="text" name="price" id="price" />
</div>
<div class="field half" id="grid-company">
<label for="company">Company</label>
<input type="text" name="company" id="company" />
</div>
<div class="field half" id="grid-lease">
<label for="lease">Lease</label>
<input type="text" name="lease" id="lease" />
</div>
<div class="field half" id="grid-other">
<label for="other">Other</label>
<input type="text" name="other" id="other" />
</div>
<div class="field" id="grid-message">
<label for="message">Message</label>
<textarea name="message" id="message" rows="5"></textarea>
</div>
<ul class="actions">
<li><button class="btn-form" type="submit" id="submit-btn"> Send Message</button></li>
</ul>
</form>
</div>
</div>






css css3 css-grid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '18 at 1:03









Michael_B

146k47234340




146k47234340










asked Dec 28 '18 at 9:41









MasterMindMasterMind

144




144












  • you defined 1fr on column and you made each area to take both of them on each row
    – Temani Afif
    Dec 28 '18 at 9:49










  • What do you propose?
    – MasterMind
    Dec 28 '18 at 10:44










  • I have problem with aligning inputs in the form
    – MasterMind
    Dec 28 '18 at 10:55


















  • you defined 1fr on column and you made each area to take both of them on each row
    – Temani Afif
    Dec 28 '18 at 9:49










  • What do you propose?
    – MasterMind
    Dec 28 '18 at 10:44










  • I have problem with aligning inputs in the form
    – MasterMind
    Dec 28 '18 at 10:55
















you defined 1fr on column and you made each area to take both of them on each row
– Temani Afif
Dec 28 '18 at 9:49




you defined 1fr on column and you made each area to take both of them on each row
– Temani Afif
Dec 28 '18 at 9:49












What do you propose?
– MasterMind
Dec 28 '18 at 10:44




What do you propose?
– MasterMind
Dec 28 '18 at 10:44












I have problem with aligning inputs in the form
– MasterMind
Dec 28 '18 at 10:55




I have problem with aligning inputs in the form
– MasterMind
Dec 28 '18 at 10:55












1 Answer
1






active

oldest

votes


















0














I had to implement grid not on .form class, but form itself.






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%2f53956436%2fgrid-column-fr-doesnt-apply%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














    I had to implement grid not on .form class, but form itself.






    share|improve this answer


























      0














      I had to implement grid not on .form class, but form itself.






      share|improve this answer
























        0












        0








        0






        I had to implement grid not on .form class, but form itself.






        share|improve this answer












        I had to implement grid not on .form class, but form itself.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '18 at 11:29









        MasterMindMasterMind

        144




        144






























            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%2f53956436%2fgrid-column-fr-doesnt-apply%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

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas