0

I don't know it can be write like that or not but I am trying to set height to html item in css style. Height is being passed in context variable from Backend Django.

I am trying this:

<style>
    .fc-agendaWeek-view tr {
      height: '{{row_height|add:"0"}}'"px"
    }

</style>

{{row_height|add:"0"}} => this is context variable passed from Django Backend which is integer i-e 70 , 80.

Where I am wrong? Can we even write like that. Any help will be appreciated.

1
  • And what issue are you having? Commented Aug 9, 2018 at 19:11

1 Answer 1

1

Your CSS is invalid. It often helps a lot to View Source on a page and see exactly what your template is outputting. In this case, I think you want something more like:

<style>
    .fc-agendaWeek-view tr {
      height: {{ row_height }}px;
    }
</style>

Which will output:

<style>
    .fc-agendaWeek-view tr {
      height: 70px;
    }
</style>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.