jgthms / bulma

Modern CSS framework based on Flexbox
https://bulma.io
MIT License
49.22k stars 3.95k forks source link

Is Bulma's navbar compatible with a table created using CSS grid? #3706

Open peterlondon1 opened 9 months ago

peterlondon1 commented 9 months ago

Should I be able to use Bulma's navbar on a page that also contains a table created using css grid?

I'm using this example table that uses css grid: https://codepen.io/neoky/pen/mGpaKN

It works perfectly - the header stays in place when the table scrolls up and down - until I add a Bulma navbar (the standard Bulma example at https://bulma.io/documentation/components/navbar/ )

Once I add the Bulma's navbar the table header initially stays in place, but then moves or gets hidden by the Bulma navbar.

n614cd commented 7 months ago

@peterlondon1

Did you check for a class name overlap?

digitigradeit commented 6 months ago

While this is an older post and the syntax isn't Bulma 1.0's grid syntax

The following css would need to be updated:

.grid-header {
  background-color: lightgray;
  position: sticky;
  top: 0;
  z-index: 1;
}

You can change it to top: 3.25rem; (for example) or whatever the desired fixed navbar-height is (if spaced navbar its height is a little longer).

peterlondon1 commented 5 months ago

thanks @digitigradeit , will give that a try