Mediaquery for bootstrap grid









up vote
0
down vote

favorite












I'm not expert in styling, I'm using bootstap for small projects.
So, my problem is the grid system. I have two monitors, first has 1920x1080 resolution and second has 1366x768.
I want say with mediaquery if the resolution is 1366x768 use the grid system of md not lg



For example I have a div as in the below



<div class="col-lg-9 col-md-6">
....
</div>

div class="col-lg-3 col-md-6">
...
</div>


Is it possible?










share|improve this question























  • Did you saw this question? stackoverflow.com/questions/23189376/…
    – Fabian
    Nov 9 at 11:20










  • @Fabian yes I saw it but I wand do it only for one not for all
    – FarukT
    Nov 9 at 11:31














up vote
0
down vote

favorite












I'm not expert in styling, I'm using bootstap for small projects.
So, my problem is the grid system. I have two monitors, first has 1920x1080 resolution and second has 1366x768.
I want say with mediaquery if the resolution is 1366x768 use the grid system of md not lg



For example I have a div as in the below



<div class="col-lg-9 col-md-6">
....
</div>

div class="col-lg-3 col-md-6">
...
</div>


Is it possible?










share|improve this question























  • Did you saw this question? stackoverflow.com/questions/23189376/…
    – Fabian
    Nov 9 at 11:20










  • @Fabian yes I saw it but I wand do it only for one not for all
    – FarukT
    Nov 9 at 11:31












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm not expert in styling, I'm using bootstap for small projects.
So, my problem is the grid system. I have two monitors, first has 1920x1080 resolution and second has 1366x768.
I want say with mediaquery if the resolution is 1366x768 use the grid system of md not lg



For example I have a div as in the below



<div class="col-lg-9 col-md-6">
....
</div>

div class="col-lg-3 col-md-6">
...
</div>


Is it possible?










share|improve this question















I'm not expert in styling, I'm using bootstap for small projects.
So, my problem is the grid system. I have two monitors, first has 1920x1080 resolution and second has 1366x768.
I want say with mediaquery if the resolution is 1366x768 use the grid system of md not lg



For example I have a div as in the below



<div class="col-lg-9 col-md-6">
....
</div>

div class="col-lg-3 col-md-6">
...
</div>


Is it possible?







html css twitter-bootstrap twitter-bootstrap-3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 at 16:49

























asked Nov 9 at 11:15









FarukT

40719




40719











  • Did you saw this question? stackoverflow.com/questions/23189376/…
    – Fabian
    Nov 9 at 11:20










  • @Fabian yes I saw it but I wand do it only for one not for all
    – FarukT
    Nov 9 at 11:31
















  • Did you saw this question? stackoverflow.com/questions/23189376/…
    – Fabian
    Nov 9 at 11:20










  • @Fabian yes I saw it but I wand do it only for one not for all
    – FarukT
    Nov 9 at 11:31















Did you saw this question? stackoverflow.com/questions/23189376/…
– Fabian
Nov 9 at 11:20




Did you saw this question? stackoverflow.com/questions/23189376/…
– Fabian
Nov 9 at 11:20












@Fabian yes I saw it but I wand do it only for one not for all
– FarukT
Nov 9 at 11:31




@Fabian yes I saw it but I wand do it only for one not for all
– FarukT
Nov 9 at 11:31












2 Answers
2






active

oldest

votes

















up vote
0
down vote













In bootstrap3, you can use col-lg class for your devices that are equl to 1200px or more and col-md class for your devices that are equal to 992px or more. Similarly in bootstrap 4 you can use col-lg class for resolution that is equal to 992px and more and col-md class for col-md for 768px or more. You can find full bootstrap grid documentation on its official site https://getbootstrap.com/docs/3.3/css/#overview-container (for bootstrap 3).



In your case im going through boostrap version 3. If you want to use col-md class on resolution of 1366X768 or more obviously you want to use col-lg class on resolution of 1920x1080 or more as you said you have two monitors. If so simply go to customize section of bootstrap official site i.e. https://getbootstrap.com/docs/3.3/customize/ Then scroll down there you will find Media queries breakpoints section. You can customize your own breakpoints from there by simply fill @screen-lg labeled input box with 1920px and @screen-md labeled with 1366px. Now you can go to the bottom of this page then simply click commpile and download button. Now you can use this downloaded bootstrap file that might work for you. Similarly each and every thing you can customize as you want by editing these less variable.






share|improve this answer



























    up vote
    -1
    down vote













    If I understand the question correctly , you can do this with JQuery . Something like this :



    if (window.matchMedia('(min-width: 1025px )').matches) 
    high.css('height', maxheight - 3);
    boxOne.css('height', maxheight);
    boxTwo.css('height', maxheight);
    boxThree.css('height', maxheight + 23);

    else if (window.matchMedia('(min-width: 768px) and (max-width: 1024px)').matches)
    high.css('height', maxheight - 11);
    boxOne.css('height', maxheight);
    boxTwo.css('height', maxheight);
    boxThree.css('height', maxheight + 23);






    share|improve this answer
















    • 1




      no I want make it with css media queries
      – FarukT
      Nov 9 at 11:29










    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%2f53224683%2fmediaquery-for-bootstrap-grid%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    In bootstrap3, you can use col-lg class for your devices that are equl to 1200px or more and col-md class for your devices that are equal to 992px or more. Similarly in bootstrap 4 you can use col-lg class for resolution that is equal to 992px and more and col-md class for col-md for 768px or more. You can find full bootstrap grid documentation on its official site https://getbootstrap.com/docs/3.3/css/#overview-container (for bootstrap 3).



    In your case im going through boostrap version 3. If you want to use col-md class on resolution of 1366X768 or more obviously you want to use col-lg class on resolution of 1920x1080 or more as you said you have two monitors. If so simply go to customize section of bootstrap official site i.e. https://getbootstrap.com/docs/3.3/customize/ Then scroll down there you will find Media queries breakpoints section. You can customize your own breakpoints from there by simply fill @screen-lg labeled input box with 1920px and @screen-md labeled with 1366px. Now you can go to the bottom of this page then simply click commpile and download button. Now you can use this downloaded bootstrap file that might work for you. Similarly each and every thing you can customize as you want by editing these less variable.






    share|improve this answer
























      up vote
      0
      down vote













      In bootstrap3, you can use col-lg class for your devices that are equl to 1200px or more and col-md class for your devices that are equal to 992px or more. Similarly in bootstrap 4 you can use col-lg class for resolution that is equal to 992px and more and col-md class for col-md for 768px or more. You can find full bootstrap grid documentation on its official site https://getbootstrap.com/docs/3.3/css/#overview-container (for bootstrap 3).



      In your case im going through boostrap version 3. If you want to use col-md class on resolution of 1366X768 or more obviously you want to use col-lg class on resolution of 1920x1080 or more as you said you have two monitors. If so simply go to customize section of bootstrap official site i.e. https://getbootstrap.com/docs/3.3/customize/ Then scroll down there you will find Media queries breakpoints section. You can customize your own breakpoints from there by simply fill @screen-lg labeled input box with 1920px and @screen-md labeled with 1366px. Now you can go to the bottom of this page then simply click commpile and download button. Now you can use this downloaded bootstrap file that might work for you. Similarly each and every thing you can customize as you want by editing these less variable.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        In bootstrap3, you can use col-lg class for your devices that are equl to 1200px or more and col-md class for your devices that are equal to 992px or more. Similarly in bootstrap 4 you can use col-lg class for resolution that is equal to 992px and more and col-md class for col-md for 768px or more. You can find full bootstrap grid documentation on its official site https://getbootstrap.com/docs/3.3/css/#overview-container (for bootstrap 3).



        In your case im going through boostrap version 3. If you want to use col-md class on resolution of 1366X768 or more obviously you want to use col-lg class on resolution of 1920x1080 or more as you said you have two monitors. If so simply go to customize section of bootstrap official site i.e. https://getbootstrap.com/docs/3.3/customize/ Then scroll down there you will find Media queries breakpoints section. You can customize your own breakpoints from there by simply fill @screen-lg labeled input box with 1920px and @screen-md labeled with 1366px. Now you can go to the bottom of this page then simply click commpile and download button. Now you can use this downloaded bootstrap file that might work for you. Similarly each and every thing you can customize as you want by editing these less variable.






        share|improve this answer












        In bootstrap3, you can use col-lg class for your devices that are equl to 1200px or more and col-md class for your devices that are equal to 992px or more. Similarly in bootstrap 4 you can use col-lg class for resolution that is equal to 992px and more and col-md class for col-md for 768px or more. You can find full bootstrap grid documentation on its official site https://getbootstrap.com/docs/3.3/css/#overview-container (for bootstrap 3).



        In your case im going through boostrap version 3. If you want to use col-md class on resolution of 1366X768 or more obviously you want to use col-lg class on resolution of 1920x1080 or more as you said you have two monitors. If so simply go to customize section of bootstrap official site i.e. https://getbootstrap.com/docs/3.3/customize/ Then scroll down there you will find Media queries breakpoints section. You can customize your own breakpoints from there by simply fill @screen-lg labeled input box with 1920px and @screen-md labeled with 1366px. Now you can go to the bottom of this page then simply click commpile and download button. Now you can use this downloaded bootstrap file that might work for you. Similarly each and every thing you can customize as you want by editing these less variable.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 at 17:22









        Nav Raj Bhattarai

        937




        937






















            up vote
            -1
            down vote













            If I understand the question correctly , you can do this with JQuery . Something like this :



            if (window.matchMedia('(min-width: 1025px )').matches) 
            high.css('height', maxheight - 3);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);

            else if (window.matchMedia('(min-width: 768px) and (max-width: 1024px)').matches)
            high.css('height', maxheight - 11);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);






            share|improve this answer
















            • 1




              no I want make it with css media queries
              – FarukT
              Nov 9 at 11:29














            up vote
            -1
            down vote













            If I understand the question correctly , you can do this with JQuery . Something like this :



            if (window.matchMedia('(min-width: 1025px )').matches) 
            high.css('height', maxheight - 3);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);

            else if (window.matchMedia('(min-width: 768px) and (max-width: 1024px)').matches)
            high.css('height', maxheight - 11);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);






            share|improve this answer
















            • 1




              no I want make it with css media queries
              – FarukT
              Nov 9 at 11:29












            up vote
            -1
            down vote










            up vote
            -1
            down vote









            If I understand the question correctly , you can do this with JQuery . Something like this :



            if (window.matchMedia('(min-width: 1025px )').matches) 
            high.css('height', maxheight - 3);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);

            else if (window.matchMedia('(min-width: 768px) and (max-width: 1024px)').matches)
            high.css('height', maxheight - 11);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);






            share|improve this answer












            If I understand the question correctly , you can do this with JQuery . Something like this :



            if (window.matchMedia('(min-width: 1025px )').matches) 
            high.css('height', maxheight - 3);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);

            else if (window.matchMedia('(min-width: 768px) and (max-width: 1024px)').matches)
            high.css('height', maxheight - 11);
            boxOne.css('height', maxheight);
            boxTwo.css('height', maxheight);
            boxThree.css('height', maxheight + 23);







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 9 at 11:19









            Bojan Kolano

            12510




            12510







            • 1




              no I want make it with css media queries
              – FarukT
              Nov 9 at 11:29












            • 1




              no I want make it with css media queries
              – FarukT
              Nov 9 at 11:29







            1




            1




            no I want make it with css media queries
            – FarukT
            Nov 9 at 11:29




            no I want make it with css media queries
            – FarukT
            Nov 9 at 11:29

















            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%2f53224683%2fmediaquery-for-bootstrap-grid%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

            𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

            Edmonton

            Crossroads (UK TV series)