From: Torsten F. <to...@ti...> - 2015-08-01 21:17:37
|
Hello collegues, from time to time I think about the following problem and want to find a general solution: When I use a fixed navbar, the navbar goes over the header, instead of staying on top, meaning that I have to put a margin-top to either the body or the header. When I change the viewport, respectively shrink the screen, likely the height of the navbar changes before the viewport, where it finally collapses. For one specific Website I could figure out the actual width, when the navbar changes to two lines depending on the amount of content (li elements and width of those). Then I could alter the behaviour of the specific fixed-navbar in context with media queries. I find this an odd solution and am looking for something that gives the fixed-navbar the space it needs instead of "stealing" space from the next element (likely the header, when I use the fixed-navbar as a metanavigation or so). Any ideas for that? Feedback appreciated. Best regards, Torsten |