html - What does this total width mean actually -
i read book called "bulletproof web design" , don't understand. says "while have declared width of 720px #nav, indent tabs we're assigning left padding of 46px. since padding added width of element, navigation's total width equals 766px."
#nav { float:left; width:720; margin:0; padding:10px 0 0 46px; background:#ffcb2d; }
i mean width 720px defined in #nav selector , padding 46px. don't know book mean total width. have never heared expression before. total width common term equal width + padding?
if @ graphic below, you'll see padding contributes total width of block:
also, author using short-hand notation padding, breaks down to:
top-padding: 10px; right-padding: 0px; bottom-padding: 0px; left-padding: 46px;
the horizontal padding contributing to total width.
Comments
Post a Comment