Home > front end >  Can I add two classes to an element in html in other places?
Can I add two classes to an element in html in other places?

Time:04-17

I'm write template (in particular, pagination) for Flask, but dont know, how to safe class "page-item" and give class "disabled"

<li 
{% if pages.has_prev %}
     
{% endif %}>

CodePudding user response:

You can have multiple classes, but you can't have multiple class attributes. They all have to be in the same attribute.

Put the if inside the class attribute.

<li  >
  • Related