Reputation: 2735
According to Materialize doc, we could create an extended navbar, but I found that the extended nav could overlap with the following content (e.g. div
).
Please see code example in Jsfiddle.
I thought maybe setting a padding-top
on body
could mitigate this issue, but I couldn't figure out how to get how much padding to use to resolve the overlapping issue.
Or is there any other better solutions?
Upvotes: 1
Views: 293
Reputation: 2370
As mentioned in Materialize - "Fixed Nav" part :
"navbar-fixed
will offset your other content while making your nav fixed."
So to resolve the problem you can remove div
with navbar-fixed
class.
Then to fix the navbar you can use position: fixed
in css. Also use position: relative
and top
for content's division to make a distance from top of page.
I updated your fiddle to resolve the issue.
Upvotes: 1