How to write a CSS hack for IE 11? [duplicate]

Use a combination of Microsoft specific CSS rules to filter IE11: <!doctype html> <html> <head> <title>IE10/11 Media Query Test</title> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <style> @media all and (-ms-high-contrast:none) { .foo { color: green } /* IE10 */ *::-ms-backdrop, .foo { color: red } /* IE11 */ } </style> </head> <body> <div class=”foo”>Hi There!!!</div> </body> … Read more

Angular 2: How to style host element of the component?

There was a bug, but it was fixed in the meantime. :host { } works fine now. Also supported are :host(selector) { … } for selector to match attributes, classes, … on the host element :host-context(selector) { … } for selector to match elements, classes, …on parent components selector /deep/ selector (alias selector >>> selector … Read more

Bootstrap Center Vertical and Horizontal Alignment

Bootstrap 5 (Updated 2021) Bootstrap 5 is still flexbox based so vertical centering works the same way as it did in Bootstrap 4. For example, align-items-center (flex-direction: row) and justify-content-center (flex-direction: column) can used on the flexbox parent (row or d-flex). Centering examples in Bootstrap 5 Vertical center (don’t forget the parent must have a … Read more

import .css file into .less file

You can force a file to be interpreted as a particular type by specifying an option, e.g.: @import (css) “lib”; will output @import “lib”; and @import (less) “lib.css”; will import the lib.css file and treat it as less. If you specify a file is less and do not include an extension, none will be added.

font-style: italic vs oblique in CSS

In the purest (type designer) sense, an oblique is a roman font that has been skewed a certain number of degrees (8-12 degrees, usually). An italic is created by the type designer with specific characters (notably lowercase a) drawn differently to create a more calligraphic, as well as slanted version. Some type foundries have arbitrarily … Read more

Detect if an input has text in it using CSS — on a page I am visiting and do not control?

You can use the :placeholder-shown pseudo class. Technically a placeholder is required, but you can use a space instead. input:not(:placeholder-shown) { border-color: green; } input:placeholder-shown { border-color: red; } <input placeholder=”Text is required” /> <input placeholder=” ” value=”This one is valid” /> <input placeholder=” ” />

How can I send an inner to the bottom of its parent ?

This is one way <div style=”position: relative; width: 200px; height: 150px; border: 1px solid black;”> <div style=”position: absolute; bottom: 0; width: 100%; height: 50px; border: 1px solid red;”> </div> </div> But because the inner div is positioned absolutely, you’ll always have to worry about other content in the outer div overlapping it (and you’ll always … Read more

Is there a ‘box-shadow-color’ property?

Actually… there is! Sort of. box-shadow defaults to color, just like border does. According to http://dev.w3.org/…/#the-box-shadow The color is the color of the shadow. If the color is absent, the used color is taken from the ‘color’ property. In practice, you have to change the color property and leave box-shadow without a color: box-shadow: 1px … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)