Which units are available in CSS?

As a web developer, you have to interact with the CSS units very often. In a typical project, almost any CSS rule contains specific values that are assigned to the properties. As a result, you should know which units are available in the CSS and how they can be used. In this article, we will …

How to change a CSS class in JavaScript

Regular web sites may only be styled with the help of plain CSS rules. But, if you are making a dynamic web site with some forms, windows, visual effects, or any other similar functionality, then you may need to modify CSS classes at runtime. Such a task is not complicated in JavaScript, there are many …

How to make a gradient in CSS

This article provides detailed information on how to create attractive CSS gradients for your web application. At the beginning, you will read specifications of the relevant CSS properties. Then, real world examples will be provided and you'll see what kind of effects can be done. In most cases, it's better to use gradients instead of …

Box shadow in CSS

If your goal is to make a visually pleasant website, then adding custom CSS shadows may be a great choice. It's a much better option than using images or backgrounds with shadow effects drawn in some graphical editor. The CSS code is rendered by the browser and is faster to load over the network. But …

Responsive font size in CSS

More and more people are using mobile devices every year, tablet computers are also very popular. And this means that each web site should work properly on all applicable screen sizes. If you set the font size only for desktop view, then your pages may not look good on small devices. As a result, you …

HTML button that acts like a link

If you are making some web application and you need to redirect user to another page, you can create a button that will act link a link. Regular <a href="#"> tag may not be suitable in some cases, for example, when you have complex logic or unusual content on a form. This article contains information …

How to change color of a placeholder in CSS

This is a very popular case in web development. Sometimes, when making a HTML form, you need to change color of a placeholder text to the desired custom value. It can be done very easily, but still, you have to know some aspects to make it look good in different browsers, especially in old. We …

How to horizontally center a DIV element

Sometimes when making a web site, you may need to center your div element horizontally inside of another container on your HTML page. There are different methods and webmasters should know how to properly use all of them. We will describe all aspects of fixing this issue and you can choose the most suitable solution …