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?
html css twitter-bootstrap twitter-bootstrap-3
add a comment |
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?
html css twitter-bootstrap twitter-bootstrap-3
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
add a comment |
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?
html css twitter-bootstrap twitter-bootstrap-3
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
html css twitter-bootstrap twitter-bootstrap-3
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
add a comment |
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
add a comment |
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.
add a comment |
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);
1
no I want make it with css media queries
– FarukT
Nov 9 at 11:29
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 14 at 17:22
Nav Raj Bhattarai
937
937
add a comment |
add a comment |
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);
1
no I want make it with css media queries
– FarukT
Nov 9 at 11:29
add a comment |
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);
1
no I want make it with css media queries
– FarukT
Nov 9 at 11:29
add a comment |
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);
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);
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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