Hoxbro
September 14, 2021, 3:39pm
1
I have a template app like the following where I want to move the header to the right, so it is next to the switch. Is there a way to do this?
import panel as pn
pn.template.FastListTemplate(
title="Example",
header="Can this be moved to the right?",
).servable()
Marc
September 14, 2021, 5:19pm
2
Hi @Hoxbro . There is nothing built in. But here is what I would try.
remove the title
. Append Spacer()
and pn.pane.Markdown
to the header
or
keep title
and try to use some css
to fix this.
UPDATE: Disregard this comment. I thought it was the title
you would like to move right. See post below instead.
Marc
September 14, 2021, 5:27pm
3
Something like
import panel as pn
from panel.pane.markup import Markdown
pn.template.FastListTemplate(
title="Example",
header=[pn.Row(pn.pane.Markdown("Can this be moved to the right?"), pn.layout.HSpacer(), pn.pane.Markdown("Yes it can!"), sizing_mode="stretch_width")]
).servable()
1 Like
Hoxbro
September 14, 2021, 5:32pm
4
Marc you’re awesome this is exactly what I needed. Thank you!
1 Like
Marc
September 14, 2021, 5:33pm
5
You’re not bad either @Hoxbro
1 Like