CSS border less than 1px [duplicate]

A pixel is the smallest unit value to render something with, but you can trick thickness with optical illusions by modifying colors (the eye can only see up to a certain resolution too). Here is a test to prove this point: div { border-color: blue; border-style: solid; margin: 2px; } div.b1 { border-width: 1px; } … Read more

How to prevent long words from breaking my div?

Soft hyphen You can tell browsers where to split long words by inserting soft hyphen (­): averyvery­longword may be rendered as averyverylongword or averyvery- longword A nice regular expression can ensure you won’t be inserting them unless neccessary: /([^\s-]{5})([^\s-]{5})/ → $1­$2 Browsers and search engines are smart enough to ignore this character when searching text, … Read more

Add line break to ::after or ::before pseudo-element content

The content property states: Authors may include newlines in the generated content by writing the “\A” escape sequence in one of the strings after the ‘content’ property. This inserted line break is still subject to the ‘white-space’ property. See “Strings” and “Characters and case” for more information on the “\A” escape sequence. So you can … Read more

Does element width include padding?

IE used to use the more-convenient-but-non-standard “border-box” box model. In this model, the width of an element includes the padding and borders. For example: #foo { width: 10em; padding: 2em; border: 1em; } would be 10em wide. In contrast, all standards-fearing browsers default to the “content-box” box model. In this model, the width of an … Read more

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