Home >CSS >CSS basics

CSS basics

A zoom effect directly on an img tag is simple because it does not affect anything else (at most you have to make sure the wrapper of the image has overflow: hidden;).

But when the image is a background image (background-image), zooming the block enlarges the background image and all other content of the block (so all fonts, blocks and so on are enlarged too). That is why you have to think of the HTML part as well and put the background image in a separate block.

read more →

Creating color gradients is not difficult. But how do you use them in a border? Is it possible at all? And if so, how?

read more →

There are many JavaScript or jQuery solutions for the parallax effect (you scroll down the page, but an element scrolls more slowly => it moves differently), but this effect can also be made with CSS alone.

read more →

Styling a drop-down list is needed very often and it is not easy. Many websites therefore replace it with a JavaScript alternative. But the select element itself has several properties you can change, and they may be enough.

read more →

A few basic but still interesting CSS3 effects that you add to an element (for example a button) just by adding a class.

read more →

Today every website has to be responsive. Responsive means that the website can be used on a mobile device (a phone, a tablet and so on) without zooming in and trying to hit tiny links.
Google has also taken mobile usability into account in search results since 2015 and today it evaluates websites primarily by their mobile version (mobile-first indexing, as of September 2026).

read more →

To style a page correctly, you have to be able to say exactly which element gets which styles. This article is an overview of how to select elements. It is not only id, class and tag, but also very useful tricks that save lines in PHP or JavaScript, so they are good to know.

read more →

To style a page correctly, you have to be able to say exactly which element gets which styles. This article is about selecting an element with several selectors at once.

read more →

The currentColor keyword holds the current text color of the element. All current browsers support it.

read more →

You have a form and you are looking for the best way to label its fields?

read more →

Load more articles