javascript - Why is the html code of width 100% for full bar is not working when I am writing. Forget about that, even the copy paste is not working. Why? -
my basic code not working, have div tried extend full window.
<!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <div style="width:100%; position:relative; height:100px; background-color:#f00;"></div> </body> </html>
and have tried copy paste, failed when copy pasted.
this original code, should seen (below)
http://codepen.io/chriscoyier/pen/pwzbbw
and copy paste code, have done (below)
this caused default browsers css. have padding, margin , other default values.
use normalize.css or reset.css layer clear default values , set them scratch yourself.
css layers: https://github.com/necolas/normalize.css/ or http://yuilibrary.com/yui/docs/cssnormalize/
in example, there difference between original copied in normalize library. (settings -> css -> normalize)
Comments
Post a Comment