0

Image I have a Layout with a fixed width column that is centered on the screen. This Layout has a header bar that for simplicity's sake has a fixed height.

Is it possible to have that header bar stay in place but make it seem like it extends all the way to the edge of the window on one side?

Let's say the header bar has a blue background and is 50px high. So the area to the right of column should also show a bar that has a blue background and a 50px height.

sven
  • 609
  • 5
  • 14

1 Answers1

-1

The only working solution I found was to use JS.

Get the window width, the header width and absolute position a super wide div so that it matches the end of the header. Then add a resize event handler (preferrably debounced) to adjust the position if needed.

This is not the solution I was hoping for. Any alternative (CSS) solutions are very welcome.

sven
  • 609
  • 5
  • 14