How to extend header towards the text?

Given the following:

#set page(
	paper: "a4",
	flipped: true,
	margin: (x: 1cm, y: 1cm, top: 6cm, bottom: 1.5cm)
)
#set page(header: context {
		rect(height: 4cm, width: 27.5cm, [hello])
})
#show table.cell.where(y:0):set text(weight:"extrabold")
#set table(
	stroke: none,
)
#let results = csv.decode("
Header1,Header2,Header3
A,B,15000
C,D,32000
E,F,16270
G,H,17209
")
#let (header, ..data) = results
#table(
	columns: header.map(x=>1fr),
  align:(left,left,right),

	table.hline(),
	table.header(..header),
	table.hline(),

	..data.flatten(),
	table.hline()
)

The page top is set to 6cm, but the rect can only be fully visible at 4cm height.
How can I extend the rect to be the same as the header height (i.e. the rect should touch the table top)?

You are probably looking for the page parameter header-ascent.
#set page(header-ascent: 0pt)

1 Like

Hey @mgholam, I’ve updated your post title to better suit our question guidelines: How to post in the Questions category

Make sure your title is a question you’d ask a friend about Typst. :wink: