Search code examples
pythoncsstemplatesdjango-pagination

CSS Classes in django-pagination package


I'm tring to use django-pagination package(http://pypi.python.org/pypi/django-pagination) and I found out that in pagination template they use the following CSS classes:

<span class="current page">
<span class="disabled next">
etc

Why do they use classnames with space symbol? Is it normal? And how can I define classname with space symbol inside?


Solution

  • The class names do not have a space in them, it is the space that separates classnames; class names cannot have a space (though they can have a hypen, which is typically used in place of spaces in a class name).

    The HTML <span class="current page"> means that the styles for both the current and page classes apply. The same goes for the second excerpt in your question except the disabled and next classes apply.