Looking to create a dynamic navigation bar that adjusts to different screen sizes? On the left side, you want an undetermined number of links, while on the right side there should be a search button.
The challenge is to ensure that all links have equal width, regardless of how many there are, and that the search button is always 50px wide. This responsiveness kicks in when the screen width falls below 768px.
To tackle this, I've employed CSS properties like table-layout: fixed
, along with table-cell
and table-row
, depending on the screen width.
While Firefox and Chrome seem to handle it well, Safari seems to struggle at times, especially when transitioning between wide and narrow screens (elements shifting between table-cells
and table-rows
).
Any suggestions on how to resolve this issue or improve the design? Could this possibly be a bug specific to Safari 6.0.2?
Check out the JSFiddle Demo:
here.