Skip to content

How to remove margin between header and content #4367

Closed Answered by falkoschindler
tz301 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @tz301,

It looks like the header height is locked in place before duration-200 causes the header to resize, while the green card does not move. Increasing the duration and removing some other classes makes it a bit clearer:

ui.context.client.content.classes('p-0')
with ui.header().classes('py-3 duration-500'):
    ui.label('Header')
ui.card().classes('w-full bg-green')

Strangely, using p-3 instead of py-3 works. To me it looks like a strange bug in Tailwind or Quasar.

As a workaround, you can use CSS definitions instead:

with ui.header().style('padding-top: 0.75rem; padding-bottom: 0.75rem; transition-duration: 500ms;'):
    ...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tz301
Comment options

Answer selected by tz301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants