html - Same relative width in fixed header and content -
please find code here: https://jsfiddle.net/5jv8m5xf/
the code above consists of fixed header , content.
i want fixed header , content have same relative width (%). therefore, put width: 80%; both of them. however, can see in jsfiddle fixed header has bigger width content.
when put fixed width (px) example width: 500px; both of them have same width. however, want them have same relative width (%) make layout responsive.
what have change in code achieve this?
default browser styles add 8px of margin <body> element.
those offsetting .content, won't effect .header, because it's fixed.
add align elements:
body { margin: 0; }
Comments
Post a Comment