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)

http://codepen.io/anon/pen/gjvmee

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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -