Welcome to WebmasterWorld Guest from 34.229.24.100

Forum Moderators: not2easy

Message Too Old, No Replies

HTML 5 nav defaults

     
9:17 pm on Aug 1, 2014 (gmt 0)

Junior Member

5+ Year Member

joined:May 17, 2011
posts:170
votes: 0


Did the HTML5 gods flip a switch on August 1st, or am I just nuts or sleep-deprived? It looks like the default upper/lower margins and left-right padding for <nav></nav> just changed, and the new defaults look different in different browsers. Maybe I didn't get the memo.
9:43 pm on Aug 1, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15699
votes: 810


the new defaults look different in different browsers

The actual values attached to an HTML element, be it <nav> or <p> or <footer> or <table> or anything else you could name, have nothing to do with The Powers That Be. (w3 and the gang.) They're set by the browser. The more common the element, the more likely the different browsers are to render it the same. You didn't just upgrade all your browsers at once did you?

In any case that's why your boilerplate CSS should always include settings for any element that actually occurs in your pages. Margins, padding, line height-- just the basics. Set a default font size and text alignment for all <h elements. Make sure your DTD is valid. Doesn't matter what it says, just that it's correct. Browsers go even more haywire if they're reduced to "quirks" mode.
10:19 pm on Aug 1, 2014 (gmt 0)

Junior Member

5+ Year Member

joined:May 17, 2011
posts:170
votes: 0


I was being facetious about the PTB, of course. My immediate hunch was that both browsers (FF and Chrome) updated automatically while I slept, and now Chrome and FF are rendering <nav> margins and <UL> padding within the <nav> element differently AND different than before today. It really throws things off for responsive CSS, since padding and margins are more critical on small screen sizes. Odd thing is, I had already expressed alignments, margins and padding for nav and nav ul. This is probably one for a CSS thread.

This is the first time I've experienced this sort of thing, and I suppose I shouldn't be surprised as I've been experimenting with HTML5 elements only recently. Maybe this is an object lesson: don't implement newfangled elements, pseudoclasses and so forth until the dust settles.