Posted about 10 years ago by Arne Hartherz.

Consider this Sass: .comment width: 320px; height: 240px; Any textarea with the comment class will be sized 320 by 240...

Posted over 10 years ago by Arne Hartherz.

CSS is a lot easier to write and read than clumsy XPath expressions. So when you need to use XPath...

Posted over 10 years ago by Ulrich Berkmueller. html5rocks.com

Some progress was made by browsers on implementing CSS filters like blur, greyscale or some other effects. You might already...

Posted over 10 years ago by Henning Koch. jakearchibald.github.com

Building CSS mobile-first is the way forward, because blah blah blah progressive enhancement blah. Problem is, Internet Explorer prior...

Posted over 10 years ago by Dominik Schöler.

Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of...

Posted over 10 years ago by Henning Koch.

You will find this useful when creating responsive designs that work well on small screens. The attached Javascript gives a...

Posted over 10 years ago by Dominik Schöler.

Say you want to vertically align a div box inside a div container. This is how you do it:

Posted over 10 years ago by Henning Koch.

When you add a linear gradient to an element, IE9 removes all border-radius and inset box-shadows. This is...

Posted over 10 years ago by Arne Hartherz. stackoverflow.com

Though the W3C even gives it as an example, no browser actually supports this CSS: img:before { content: "something"; }

Posted over 10 years ago by Henning Koch.

It's not logical, so don't be too hard on yourself. You need to give it a height and...

Posted over 10 years ago by Henning Koch.

Note that you are not allowed to embed any font in a website. You need to check the license first...

Posted over 10 years ago by Henning Koch.

You can use this code: function scrollToLine($textarea, lineNumber) { var lineHeight = parseInt($textarea.css('line-height')); $textarea.scrollTop(lineNumber * lineHeight); }

Posted over 10 years ago by Henning Koch. teddevito.com

This is a demo of the "Tabby" Javascript jQuery plugin to use tabs in regular textareas to make them suitable...

Posted over 10 years ago by Ulrich Berkmueller.

Capybara has a global option (Capybara.ignore_hidden_elements) that determines whether Capybara sees or ignores hidden elements.

Posted over 10 years ago by Arne Hartherz.

You can change the color for text selection via CSS, using the ::selection and ::-moz-selection pseudo-elements.

Posted over 10 years ago by Arne Hartherz.

You can use text-overflow to truncate a text using CSS but it does not fit fancy requirements.

Posted over 10 years ago by Arne Hartherz.

When using Rails to truncate strings, you may end up with strings that are still too long for their container...

Posted over 10 years ago by Henning Koch. addyosmani.github.com

Twitter's Bootstrap CSS blueprint as a jQuery UI theme. Even if you don't want to use Bootstrap as...

This website uses short-lived cookies to improve usability.
Accept or learn more