HTML & CSS

Tailwind CSS: How to Create Circle Loading Indicators

Updated: May 9, 2022 By: Pennywise

This article shows you how to make loading indicators with only pure Tailwind CSS. There is no need to use SVGs, GIFs, or any kinds of icons. The most important point is that in Tailwind CSS,…

How to Style File Inputs with Tailwind CSS

Updated: May 9, 2022 By: Pennywise

In Tailwind CSS, You can combine the file modifier (a modifier is just a prefix that can be added to the beginning of a class) with other utility classes to create a custom beautiful file input,…

How to Create a Fixed Sidebar with Tailwind CSS

Updated: May 8, 2022 By: A Goodman

The example below shows you how to create a full-height fixed sidebar with Tailwind CSS. We will be using fixed and top-0 (optional) and left-0 (optional) utility classes for the sidebar. Besides, in order to prevent…

Tailwind CSS: How to Create a Sticky/Affix NavBar

Updated: May 7, 2022 By: A Goodman

This concise article shows you how to create a sticky/affix navigation bar with only Tailwind CSS (no Javascript code or any extra CSS is required). Overview In general, the position of a sticky navbar is relative…

How to Add Drop Shadows in Tailwind CSS

Updated: March 3, 2023 By: Pennywise

In Tailwind CSS, you can create drop shadows by using drop-shadow-{amount} utilities. {amount} can be: You can customize the shadow color by using shadow-{color} utilities. Example: Screenshot: Further reading: You can also check out our CSS…

Tailwind CSS: How to Create a Fixed Top Menu Bar

Updated: May 8, 2022 By: A Goodman

In Tailwind CSS, you can easily implement a fixed top NavBar by using the fixed and z-index utilities, like so: Here’s a full example: Note: If you’re using Safari, this demo video might not work nicely…

How to create cut-out text effect with Tailwind CSS

Updated: March 3, 2023 By: A Goodman

The steps below show you how to create a cut-out text effect with Tailwind CSS. 1. Prepare HTML markup: 2. Set an image background for the div element. We can do this by using inline styles…

Tailwind CSS: How to Create Gradient Text

Updated: March 3, 2023 By: A Goodman

The quick example below shows you how to create gradient text with TailwindCSS. Screenshot: The code: Further reading: You can also check out our CSS category page for the latest tutorials and examples.

How to Create Circle Buttons with Tailwind CSS

Updated: March 3, 2023 By: A Goodman

To create a circle button with TailwindCSS, first, create a button with equal width and height (square), then use the rounded-full utility like this: Screenshot: Further reading: You can also check out our CSS category page…

Tailwind CSS: Create a Button with Gradient Background

Updated: March 3, 2023 By: A Goodman

In TailwindCSS, you can implement color linear gradients by using bg-gradient-{direction}, from-{color}. via-{color}, and to-{color} utilities. The quick example below creates a button with a gradient background. Screenshot: The code: That’s it. Further reading: You can…

Tailwind CSS: Center an Element inside a Div

Updated: March 3, 2023 By: A Goodman

This short and straight-to-the-point article shows you how to vertically and horizontally center an element inside a <div> element with TailwindCSS. Center an Element Vertically To vertically center an element, just use Tailwind’s flex and items-center…

CSS: Flipping Card on Hover

Updated: February 6, 2022 By: Pennywise

The example below shows you how to create flipping card animation with pure CSS. Example Preview HTML CSS The Complete Code Final Words We’ve examined an end-to-end example of implementing a flipping card effect using pure…

1 4 5 6 7 8