diff --git a/templates/training/main.html b/templates/training/main.html
index 321d133..ef2f831 100644
--- a/templates/training/main.html
+++ b/templates/training/main.html
@@ -38,13 +38,13 @@
{% for subsection in section.subsections %}
{% set subsection = get_section(path=subsection) %}
{% set parent_index = loop.index %}
-
+{% set container_height = subsection.pages | length * 50 %}
{
id: '{{parent_index}}',
data: { label: '{{subsection.title}}' },
position: { x: {{loop.index0 * 250 + 50}}, y: 100 },
className: 'light',
-style: { backgroundColor: 'rgba(255, 0, 0, 0.2)', width: 200, height: {{subsection.pages | length * 10 + 50}} },
+style: { backgroundColor: 'rgba(255, 0, 0, 0.2)', width: 200, height: {{ container_height + 50 }}},
},
{% for page in subsection.pages %}