Less css file include in section

Referring to LESS documentation (http://lesscss.org/#client-side-usage): Link your .less stylesheets with the rel set to “stylesheet/less”: <link rel=”stylesheet/less” type=”text/css” href=”https://stackoverflow.com/questions/18335299/styles.less” /> Then download less.js from the top of the page, and include it in the <head> element of your page, like so: <script src=”https://stackoverflow.com/questions/18335299/less.js” type=”text/javascript”></script> Make sure you include your stylesheets before the script. This method … Read more

Spurious margin on svg element

This is a common issue with inline elements. To solve this, simply add vertical-align:top. UPDATED EXAMPLE HERE #foo { background: #fff; vertical-align:top; } It’s worth noting that the default value for the vertical-align property is baseline. This explains the default behavior. Values such as top, middle, and bottom will correct the alignment. Alternatively, you could … Read more

Using Angular2 ngFor index

Angular does not provide this functionality out of the box. I think that the simplest way to achieve the desired result is to only display data on every third index like so: <div class=”list-group”> <div *ngFor=”let p of products; let idx = index” > <div class=”row” *ngIf=”idx % 3 === 0″> <app-product [product]=”products[idx]”></app-product> <app-product [product]=”products[idx+1]”></app-product> … Read more

How to include all css kept in a directory?

You could create a master stylesheet that you include in every page, and within that css file you can use @import to include the others. This doesn’t solve the problem of having to manually include each individual css file, but at least it encapsulates it within the master stylesheet so you don’t have to repeat … Read more

Transparent border with background color

The behaviour you are experiencing is that the background of the element appears through the transparent border. If you want to prevent this and clip the background inside the border, you can use: background-clip: padding-box; html, body { height: 100%; margin: 0; padding: 0; background:green; } #nav { position:relative; height: 100%; width: 240px; background-clip: padding-box; … Read more

What values can I put in an HTML attribute value?

If your attribute value is quoted (starts and ends with double quotes “), then any characters except for double quotes and ampersands are allowed, which must be quoted as &quot; and &amp; respectively (or the equivalent numeric entity references, &#34; and &#38;) You can also use single quotes around an attribute value. If you do … Read more