Setting the width of the element will prevent it from stretching out to the edges of its container. The element will then take up the specified width, and the remaining space will be split equally between the two margins

Responsive Topnav Example

Resize the browser window to see how it works.

About text here

Resize the browser window to see how it works.

Responsive Topnav Example

Resize the browser window to see how it works.