Responsive images in HTML5, using srcset

Images often are problematic while we creating web page . Displaying larger image on larger screen is a better for user experience, but displaying large photo on small screen, e.g. on a phone, may unnecessarily delay page loading. Therefore, a good solution is to “serve” images with different sizes and weight for different screens.

Read more

Auto resize image to div size

Sometimes we want that picture on page shrinks when browser window shrins. This can be easily achieved by using a short css entry.

Read more

What is hoisting in javascript?

Every junior front-end developer should know what hoisting is. This issue can be easily understood, so if you have not heard of it before, you can quickly catch up:

Read more

How to set div to 100% window height?

Tworząc strony internetowe zdarza się, że chcemy, aby div z określonymi informacjami zajmował całą wysokość okna, niezależnie od wysokości tego okna. Wiadomo, że ustawiając wysokość dziecka na 100% zajmuje ono całą przestrzeń swojego rodzica. Zatem aby div zajmował całą wysokość okna, wszyscy jego rodzice muszą także mieć ustawioną taką wysokość. When we create websites, we […]

Read more

How to center div horizontally and vertically in css

The problem of centering divs or text is quite common and I often had to spend more time fixing it than I would like. Sometimes the situation is simple and using one of the basic methods, like margin: 0 auto solves the case, and sometimes you have to think a little more. Therefore, below are […]

Read more

How to copy an array in javascript?

We have array [“javascript”, “jest”, “fajny”, 1, 2, 3]. Let’s see what’s happends, if we want to copy it and assign it do variable, and next modify it:

Read more