Skip to main content

quick-tips

A bunch of lines of CSS, taken at and angle and partially out of focus

The least amount of CSS for a decent looking site

People often over-engineer solutions, and it leads to them running into problems with their CSS. In this article, we'll take a look at the least amount of CSS that you need to make a decent looking page.

Layout
Two cards, one that has text that fits in the available space, the second one which has too much, but after three full lines, it's cut off with an ellipsis

How to set a maximum number of lines of text with CSS

Limiting the total visible lines of text within an element is something I get asked about pretty frequently, and while there are probably some complex JavaScript solutions, there is a simple, though slightly strange, way to do it with CSS only.

Quick Tips
examples of several attribute selectors

Attribute selectors are OP

There are all sorts of selectors in CSS and one that get’s very little love might be one of the most powerful ones out there… the attribute selector.

Quick Tips