Unused CSS Blog

Rotate Background Image

Example of Rotate Background Image

Applying background images is a frequent frontend requirement. But at times, we may need to rotate those images in the background without affecting the orientation of content in the foreground. In this article, we will observe how the ::before pseudo-element of CSS can help us achieve the rotation of a background image. We will walk through the step-by-step construction of the following codepen.

Accessible CSS-Only Hamburger Menu

Example of Accessible CSS-Only Hamburger Menu

At times, CSS can be amazingly powerful. One such case is of building a CSS-only hamburger menu. This article will walk through the construction of a hamburger menu powered by plain HTML and CSS only.

Margin vs Padding

Example of Margin vs Padding

Understanding the difference between margin and padding can be tricky in CSS as both are spacings. In this article, we will observe how they are different and why having an incomplete understanding can lead to design bugs.

CSS Partial Borders

Example of CSS Partial Borders

At times one needs to create partial borders for elements. Partial borders are not offered out-of-the-box by CSS. But that doesn’t stop us from creating them ourselves. In this article, we will see various techniques for implementing different types of partial borders.

CSS Adjacent Paragraph Spacing

Example of CSS Adjacent Paragraph Spacing

Adjusting the spacing of layout content can at times get very tricky. Consider the following layout: