New styles, tags, functionalities – this is what tiggers like best 🙂 In this post I will show you how to style text using the text-decoration tag and what new styles for lines (underlines, overlines) are available from 2019
Read More CSS text-decoration property and new styles 2019Category: CSS
CSS Tutorials // “How To” about pure CSS and preprocessors
Styling chosen links on site, e.g only links to PDF file
In previous post: styling lists with pseudo-classes I described how to change the color of active, clicked or hovered links. Now I will show you how to change the style of selected links, e.g. only those that lead to PDF files.
Read More Styling chosen links on site, e.g only links to PDF fileStyling links with css
Standard appearance of hyperlinks on a website depends on the browser. Each browser can display links and their variants (with different pseudo-classes) in a different way.
Usually we want to set our own styles so to display links in the same way in any browser.
Links can have different states, and each of this states can be styled. This states are called pseudo-classes.
Read More Styling links with cssRem, em – length units in CSS
I must admit that I rarely used such units of length as rem and em so far. I usually used pixels (px), because somehow it was easier for me to associate what size a given element will have.
The rem and em units, however, have one advantage over pixels – they can be set in correlation to parent font size (em) or root font size, which most often is <html> elemet (rem). This gives the ability to manipulate sizes for many elements at once. The default root font value is usually 16px (but it depends on the browser).
Read More Rem, em – length units in CSSAuto 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 Auto resize image to div sizeHow 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 sometimes want to div takes 100% window height, depending on the height of the user’s browser window . It is known that by setting the child’s height to 100%, it takes the entire space of its parent. That’s why if we want to child div takes all window height, we must set all its parents to have 100% height.
Read More How to set div to 100% window height?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 some useful methods that you can use depending on your needs.
Read More How to center div horizontally and vertically in css