Breadcrumbs stylization. Use of lists. Add transparency with border

Lists are convenient due to their hierarchical structure and flexible view settings, therefore they are used not only for their intended purpose, but also for creating various page elements such as breadcrumbs, pagination, menus, tabs, etc.

breadcrumbs

Breadcrumbs help you navigate the site and show the position of the current page relative to other sections of the site. This makes it easy to go up a level and understand which section you are currently in. So, for a technical site, navigation can be as follows (Fig. 1).

Rice. 1. Type of bread crumbs

The last text points to the current page and is not a link. All items are separated from each other by some symbol, usually an arrow (→), a slash (/), a greater than sign (>), and the like.

Since the design is assigned to styles, the HTML code is very concise. We create a list and assign the breadcrumbs class to it so that the style does not spread to other lists.

Note that there are no separators here, they are displayed using the content style property (example 1).

Example 1: Creating Breadcrumbs

breadcrumbs

To begin with, we reset all the margins and indents of the list and line up the items horizontally through the display property with a value of inline-block . It also removes markers, so you don't need to do it on purpose. The ::before pseudo-element is required to add a separator between items and control its appearance. The text is added to all items, including the first one, which of course we don't need. Therefore, we remove it with the :first-child pseudo-class, which applies the style to the first element

  • .

    A large number of materials, such as site articles, are often divided into separate pages with 10-15 articles per page, which leads to a reduction in site load. The transition between individual pages is done through their numbering, where each number serves as a link to the corresponding page. It is possible to display all pages, a certain number of them, or only links to the next and previous page. Which option to choose depends on the design of the site and your preferences. One of possible ways numbering is shown in fig. 2.

    Rice. 2. Pagination

    To do this numbering, we again use a simple list, now with the pager class, each item of this list will be a link to the page. To highlight the current page, let's add the active class (example 2).

    Example 2: Pagination

    Pagination

    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    The line between the items is done through the border-bottom property on the element

  • Articles By topic:
    Receiving information What is the difference between receiving information and receiving a message
    Information is information about somethingThe concept and types of information, transmission and processing, search and storage of informationExpand content Collapse content Information is, definition Information is any information received and transmitted, stored
    What is a landing page and how should it look like What is the name of a landing page on the Internet
    Most owners of private businesses, various services and small organizations understand how important it is to conduct business online. Creating a website and maintaining a page in social networks is now part of the marketing strategy of any company. But few companies and
    How to install your template on ucoz - A program that you did not know about, we are learning to connect!
    How to Install a Joomla Template - Troubleshooting - 4.5 out of 5 based on 2 votes Selecting, installing and configuring a template is one of the most important steps in creating a Joomla site. In this tutorial, we'll look at how to install a template
    Faibisovich - a guide to the design of electrical networks
    HANDBOOK ON THE DESIGN OF ELECTRIC NETWORKS Edited by D. L. FAIBISOVICH Edition 4, revised and supplemented Reviewer V. V. Mogirev Authors : I. G. Karapetyan (pp. 3.2, 5.1, 5.3–5.8, sec. 6, sec. 7), D. L. Faibisovi