How do i make the form field responsive?











up vote
-1
down vote

favorite












I have just started to learn django few weeks. To learn more effectively i have started to build a hotel website and deployed using heroku. The website seems better on mine laptop but looks worse on my ipad or mobile. I wanted to make the form fields reponsive using css or django crispy form. I have found a lot of answers but none of them help me understand how to do it. Also any further recommendation for the website would be recommended for me as a beginner in web development.
Here is the website: https://hotel-jumera.herokuapp.com
(Its mine practise for building website, so sorry for in case copyright issue)
form field in template:



<form  method='post'>
{% csrf_token %}
{{booking_form.as_p }}
<button type="submit" class="btn btn-success"> Send </button>
</form>









share|improve this question






















  • You can use bootstrap
    – ruddra
    Nov 9 at 3:52










  • using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
    – robotHamster
    Nov 9 at 4:03










  • Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
    – Bishal Gautam
    Nov 9 at 7:15










  • Can you be more specific on how to use the class="form-control " on the form
    – Bishal Gautam
    Nov 9 at 7:22















up vote
-1
down vote

favorite












I have just started to learn django few weeks. To learn more effectively i have started to build a hotel website and deployed using heroku. The website seems better on mine laptop but looks worse on my ipad or mobile. I wanted to make the form fields reponsive using css or django crispy form. I have found a lot of answers but none of them help me understand how to do it. Also any further recommendation for the website would be recommended for me as a beginner in web development.
Here is the website: https://hotel-jumera.herokuapp.com
(Its mine practise for building website, so sorry for in case copyright issue)
form field in template:



<form  method='post'>
{% csrf_token %}
{{booking_form.as_p }}
<button type="submit" class="btn btn-success"> Send </button>
</form>









share|improve this question






















  • You can use bootstrap
    – ruddra
    Nov 9 at 3:52










  • using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
    – robotHamster
    Nov 9 at 4:03










  • Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
    – Bishal Gautam
    Nov 9 at 7:15










  • Can you be more specific on how to use the class="form-control " on the form
    – Bishal Gautam
    Nov 9 at 7:22













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have just started to learn django few weeks. To learn more effectively i have started to build a hotel website and deployed using heroku. The website seems better on mine laptop but looks worse on my ipad or mobile. I wanted to make the form fields reponsive using css or django crispy form. I have found a lot of answers but none of them help me understand how to do it. Also any further recommendation for the website would be recommended for me as a beginner in web development.
Here is the website: https://hotel-jumera.herokuapp.com
(Its mine practise for building website, so sorry for in case copyright issue)
form field in template:



<form  method='post'>
{% csrf_token %}
{{booking_form.as_p }}
<button type="submit" class="btn btn-success"> Send </button>
</form>









share|improve this question













I have just started to learn django few weeks. To learn more effectively i have started to build a hotel website and deployed using heroku. The website seems better on mine laptop but looks worse on my ipad or mobile. I wanted to make the form fields reponsive using css or django crispy form. I have found a lot of answers but none of them help me understand how to do it. Also any further recommendation for the website would be recommended for me as a beginner in web development.
Here is the website: https://hotel-jumera.herokuapp.com
(Its mine practise for building website, so sorry for in case copyright issue)
form field in template:



<form  method='post'>
{% csrf_token %}
{{booking_form.as_p }}
<button type="submit" class="btn btn-success"> Send </button>
</form>






html css django responsive-design django-crispy-forms






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 3:51









Bishal Gautam

1




1












  • You can use bootstrap
    – ruddra
    Nov 9 at 3:52










  • using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
    – robotHamster
    Nov 9 at 4:03










  • Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
    – Bishal Gautam
    Nov 9 at 7:15










  • Can you be more specific on how to use the class="form-control " on the form
    – Bishal Gautam
    Nov 9 at 7:22


















  • You can use bootstrap
    – ruddra
    Nov 9 at 3:52










  • using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
    – robotHamster
    Nov 9 at 4:03










  • Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
    – Bishal Gautam
    Nov 9 at 7:15










  • Can you be more specific on how to use the class="form-control " on the form
    – Bishal Gautam
    Nov 9 at 7:22
















You can use bootstrap
– ruddra
Nov 9 at 3:52




You can use bootstrap
– ruddra
Nov 9 at 3:52












using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
– robotHamster
Nov 9 at 4:03




using bootstrap's class = "form-control" on your form fields might be enough after checking your website...
– robotHamster
Nov 9 at 4:03












Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
– Bishal Gautam
Nov 9 at 7:15




Sorry to bother you but i am unable to use class="form-control", i tried to research on it , but it just seems so vague for me.Thanks!
– Bishal Gautam
Nov 9 at 7:15












Can you be more specific on how to use the class="form-control " on the form
– Bishal Gautam
Nov 9 at 7:22




Can you be more specific on how to use the class="form-control " on the form
– Bishal Gautam
Nov 9 at 7:22












1 Answer
1






active

oldest

votes

















up vote
0
down vote













What you want to do is set some break points in your css where you can change the width of elements on your site



@media only screen and (min-width: 400px) {
.col-2 {
background-color: red;
}
}


If the browser window is 600px or bigger, the background color will be red.
This is a mobile first approach. You build your site for mobile and then add breakpoints to cater for larger screens tablet min-width: 600px and desktop min-width: 1200px






share|improve this answer





















  • I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
    – Bishal Gautam
    Nov 9 at 7:18










  • I'm going to need more info Where are you added the media query
    – Trevor Joseph
    Nov 9 at 8:56










  • I have tried every where and finally got somewhat reponsive but using django-crispy-forms
    – Bishal Gautam
    Nov 9 at 10:59











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%2f53219615%2fhow-do-i-make-the-form-field-responsive%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








up vote
0
down vote













What you want to do is set some break points in your css where you can change the width of elements on your site



@media only screen and (min-width: 400px) {
.col-2 {
background-color: red;
}
}


If the browser window is 600px or bigger, the background color will be red.
This is a mobile first approach. You build your site for mobile and then add breakpoints to cater for larger screens tablet min-width: 600px and desktop min-width: 1200px






share|improve this answer





















  • I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
    – Bishal Gautam
    Nov 9 at 7:18










  • I'm going to need more info Where are you added the media query
    – Trevor Joseph
    Nov 9 at 8:56










  • I have tried every where and finally got somewhat reponsive but using django-crispy-forms
    – Bishal Gautam
    Nov 9 at 10:59















up vote
0
down vote













What you want to do is set some break points in your css where you can change the width of elements on your site



@media only screen and (min-width: 400px) {
.col-2 {
background-color: red;
}
}


If the browser window is 600px or bigger, the background color will be red.
This is a mobile first approach. You build your site for mobile and then add breakpoints to cater for larger screens tablet min-width: 600px and desktop min-width: 1200px






share|improve this answer





















  • I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
    – Bishal Gautam
    Nov 9 at 7:18










  • I'm going to need more info Where are you added the media query
    – Trevor Joseph
    Nov 9 at 8:56










  • I have tried every where and finally got somewhat reponsive but using django-crispy-forms
    – Bishal Gautam
    Nov 9 at 10:59













up vote
0
down vote










up vote
0
down vote









What you want to do is set some break points in your css where you can change the width of elements on your site



@media only screen and (min-width: 400px) {
.col-2 {
background-color: red;
}
}


If the browser window is 600px or bigger, the background color will be red.
This is a mobile first approach. You build your site for mobile and then add breakpoints to cater for larger screens tablet min-width: 600px and desktop min-width: 1200px






share|improve this answer












What you want to do is set some break points in your css where you can change the width of elements on your site



@media only screen and (min-width: 400px) {
.col-2 {
background-color: red;
}
}


If the browser window is 600px or bigger, the background color will be red.
This is a mobile first approach. You build your site for mobile and then add breakpoints to cater for larger screens tablet min-width: 600px and desktop min-width: 1200px







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 4:12









Trevor Joseph

11




11












  • I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
    – Bishal Gautam
    Nov 9 at 7:18










  • I'm going to need more info Where are you added the media query
    – Trevor Joseph
    Nov 9 at 8:56










  • I have tried every where and finally got somewhat reponsive but using django-crispy-forms
    – Bishal Gautam
    Nov 9 at 10:59


















  • I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
    – Bishal Gautam
    Nov 9 at 7:18










  • I'm going to need more info Where are you added the media query
    – Trevor Joseph
    Nov 9 at 8:56










  • I have tried every where and finally got somewhat reponsive but using django-crispy-forms
    – Bishal Gautam
    Nov 9 at 10:59
















I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
– Bishal Gautam
Nov 9 at 7:18




I tried to use media queries but it seems it doesnot have any effect to my browser.Thanks!
– Bishal Gautam
Nov 9 at 7:18












I'm going to need more info Where are you added the media query
– Trevor Joseph
Nov 9 at 8:56




I'm going to need more info Where are you added the media query
– Trevor Joseph
Nov 9 at 8:56












I have tried every where and finally got somewhat reponsive but using django-crispy-forms
– Bishal Gautam
Nov 9 at 10:59




I have tried every where and finally got somewhat reponsive but using django-crispy-forms
– Bishal Gautam
Nov 9 at 10:59


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219615%2fhow-do-i-make-the-form-field-responsive%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

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff