Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Bootstrap look more "Compact"

I want to have the same "Compact" look - in terms of font-size, padding and general use of space as I get when I use the browser zoom-out (Ctrl--). Of course without the side-effects most importantly reduction in container width.

I have tried fiddling with the @baseFontSize and @baseLineHeight variables in Bootstrap's http://getbootstrap.com/2.3.2/customize.html download screen but I am missing something as the result :

  1. Doesn't look right - in terms of balance, padding is not right.

  2. Breaks on the projector screen (the horror!) - select boxes, layout, everything goes crazy.

Please bail me out!

like image 881
Ali Zaidi Avatar asked Sep 03 '13 05:09

Ali Zaidi


People also ask

How do I make bootstrap container full width?

Choose from a responsive, fixed-width container (meaning its max-width changes at each breakpoint) or fluid-width (meaning it's 100% wide all the time). container-fluid class can be used to get full width container. container-fluid class provides a full-width container which spans the entire width of the viewport.

Is Bootstrap 3 mobile first?

With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first.

How do you make a Div responsive in HTML CSS?

The CSS Media Query can be used to make an HTML “div” responsive. The media queries allow the users to change or customize the web pages for many devices like desktops, mobile phones, tablets, etc without changing the markups.


1 Answers

What about using media queries inside your html tag and using rem units based off it? Might be too late to start that but I find it a hand way to control spacing,

html{
    background: $black;
      scroll-behavior: smooth;
    padding:0;
    margin:0;
        @media screen and (min-width: 2560px){
                font-size:16px;
        }
        @media screen and (min-width: 1920px) and (max-width: 2559px){
                font-size:15px;
        }
        @media screen and (min-width: 1681px) and (max-width: 1919px){
                font-size:15px;
        }
        @media screen and (min-width: 1441px) and (max-width: 1680px){
                font-size:13px;
        }
        @media screen and (min-width: 1366px) and (max-width: 1440px){
            font-size:13px;
        }
        @media screen and (min-width: 1024px) and (max-width: 1365px){
            font-size:12px;
        }
        @media screen and (min-width:992px) and (max-width: 1023px) {
            font-size:12px;
        }
        @media screen and (min-width:768px) and (max-width: 991px) {
            font-size:12px;
        }
        @media screen and (min-width:441px) and (max-width:767px) {
                font-size:12px;
        }
        @media screen and (min-width:351px) and (max-width:440px) {
                font-size:12px;
        }
        @media screen and (max-width:350px) {
                font-size:12px;
        }
like image 56
Double Marvellous Avatar answered Sep 24 '22 11:09

Double Marvellous