Useful CSS tricks— Part 2

Useful CSS tricks— Part 2

In this article, I will talk about part 2 of a collection of CSS tricks that can be useful for a web developer in his day-to-day work.

If you have missed my previous article about part 1 of the useful CSS tricks, you can access it here:

Now, let’s get going with the other CSS tricks that can be really helpful.

Here are the following 5 more tricks that I regularly use:

1. Caret styles

A caret icon can be used for multiple purposes in the UI. A caret can be used along with a hyperlink or it can be used as a next or previous icon in the paging component or a carousel component to move between slides.

2. Checkbox toggle

A checkbox is a really useful input element but the downside of it is that it cannot be easily styled like other input elements and that’s where the magic of CSS does its job and make a boring-looking checkbox turned into a fancier toggle button.

3. Counter badge

You probably would have seen a badge on top of a cart icon that shows you the items count available in the cart or a badge that shows you the count of unread notifications. With CSS, you can create a badge with just a few lines of code.

Icons are one of the essential parts of the user interface and they really help in getting across the intent of an element or an action. It really adds up to the usability of the web interface. An icon can be used as a standalone element or combined with another element. Here is how you can create a button along with showing an icon in it.

5. Custom scrollbar

Having a custom-looking scrollbar is sometimes required to complement the rest of the UI of the website. A scrollbar and its various parts can be easily customized by using its pseudo-elements.


Every website has a different user interface. However, there can be common styles that every website uses and then all these CSS tricks can come in really handy.

programming web-development css useful tricks

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Hire CSS Developer

Want to develop a website or re-design using CSS Development? We build a website and we implemented CSS successfully if you are planning to **[Hire CSS Developer]( "Hire CSS Developer")**...

Useful CSS Tricks: 5 CSS Tricks

In this article, here are the first 5 CSS tricks that I regularly use in my daily work:

5 Web Design Software You Should Use for Web Development

Want to know best web design software to built an awesome website? We've handpicked the top 5 web development software you should use for your project!

Exposing Most Common Web Development Myths | ByteCipher

Are you looking for the best Web and Mobile App Development Company in India? We at ByteCipher are offering creative & custom web and mobile app development services worldwide

Why Web Development is Important for your Business

With the rapid development in technology, the old ways to do business have changed completely. A lot more advanced and developed ways are ...