Module 5
Selected chapters. Introduction to nth-childs (examples in lists, icon boxes, navigation menu etc). Further examples on pseudoelements. Custom bullet lists and custom icons as bullets. Customizing ordered lists. Advanced styling of background images with opacity.
Selected chapters. Introduction to nth-childs (examples in lists, icon boxes, navigation menu etc). Further examples on pseudoelements. Custom bullet lists and custom icons as bullets. Customizing ordered lists. Advanced styling of background images with opacity.
How to use display: inline-block or inline-flex for list items to create horizontal lists. Using list-style-type: none for your list to clear it from any formatting and remove the bullets first. Very useful for labels and tags or nav menu items!
With nth-childs, you can target first, second, third, last or any other element of a parent and apply different styling than the rest of the elements. You can also target individual elements of these nth-childs, for example a heading element of the third box in a parent container or a text color of the second link in a group of links.
Creating a highlighter text effect using span for best results. We are creating the effect using linear-gradient as a span background and creating hard stops between transparent colors and our highlighter color. Then, we will use percentages in this gradient to control the thickness of our line and where exactly the hard stop starts and finishes.
Using Unicode symbols, emojis and Font Awesome icons as custom bullets for unordered lists. We will also add custom graphics as our bullets using before pseudoelements and their background-image property for the most flexibility and control.
Advanced styling of ordered lists: list-style-position property, how to put numbers in squares or circles, how to use text-indent for the first line in multi-line list items. You will learn how to add a word like ‘Step’ or ‘Process’ before list item markers. And lastly, how to place these on a separate line above the list item text using display: block and before pseudoelements.
How to create a faded background image using a before pseudoelement and controling the transparency using its opacity. The text on top will stay untouched by this opacity settings. Then, we will see how to stack the elements by setting the z-index of this before pseudoelement to a negative value to push it to the back.