How to add spacing between columns?

I was facing the same issue; and the following worked well for me. <div class=”row”> <div class=”col-md-6″> <div class=”col-md-12″> Some Content.. </div> </div> <div class=”col-md-6″> <div class=”col-md-12″> Some Second Content.. </div> </div> </div> This will automatically render some space between the 2 divs.

Angular-cli from css to scss

For Angular 6 check the Official documentation Note: For @angular/cli versions older than 6.0.0-beta.6 use ng set in place of ng config. For existing projects In an existing angular-cli project that was set up with the default css styles you will need to do a few things: Change the default style extension to scss Manually … Read more

CSS: Set a background color which is 50% of the width of the window

Older Browser Support If older browser support is a must, so you can’t go with multiple backgrounds or gradients, you’re probably going to want to do something like this on a spare div element: #background { position: fixed; top: 0; left: 0; width: 50%; height: 100%; background-color: pink; } Example: http://jsfiddle.net/PLfLW/1704/ The solution uses an … Read more

Any way to limit border length?

CSS generated content can solve this for you: div { position: relative; } /* Main div for border to extend to 50% from bottom left corner */ div:after { content: “”; background: black; position: absolute; bottom: 0; left: 0; height: 50%; width: 1px; } <div>Lorem Ipsum</div> (note – the content: “”; declaration is necessary in … Read more

What does flex: 1 mean?

flex: 1 means the following: flex-grow : 1; ➜ The div will grow in same proportion as the window-size flex-shrink : 1; ➜ The div will shrink in same proportion as the window-size flex-basis : 0; ➜ The div does not have a starting value as such and will take up screen as per the … Read more

How to create color shades using CSS variables similar to darken() of Sass?

The new Specification introduces “relative color syntax” where you can do the following :root { –color-primary: #f00; /* any format you want here */ –color-primary-darker: hsl(from var(–color-primary) h s calc(l – 5%)); –color-primary-darkest: hsl(from var(–color-primary) h s calc(l – 10%)); } The idea is to convert the main color to hsl format and using calc() … Read more