i try to design a header with a navigation in itself,it looks ok in normal position, but whenever zooming in the page,the header text and the anchor text alone zooms and out of header
You should only ever use % when making a fluid layout. If anything, always stick to px and em. Think of it like this. Percentage is constantly changing proportions (although not technically true for font size etc.) but for a div, based on the size of your browser window, % will adapt to that window size, whereas px is absolute in size. if the height is 100px, it will always be 100px. If the div is 33% in height, that will cover one-third of the height of your window always.
i try to design a header with a navigation in itself,it looks ok in normal position, but whenever zooming in the page,the header text and the anchor text alone zooms and out of header
this is the pen
help me solve it out
That's because the header is set to a percentage height....try setting to to a fixed pixel height.
@paulie_d thanks, and where we use % and is it possible to use px for all
I'm not sure what you are asking.
You should only ever use % when making a fluid layout. If anything, always stick to px and em. Think of it like this. Percentage is constantly changing proportions (although not technically true for font size etc.) but for a
div, based on the size of your browser window, % will adapt to that window size, whereaspxis absolute in size. if the height is 100px, it will always be 100px. If the div is 33% in height, that will cover one-third of the height of your window always.