why does my html link with css but not my img -


html:

<!doctype html> <html> <head>     <title>example domain</title>     <link rel="stylesheet" type="text/css" href="stylesheet.css" />     <meta charset="utf-8" />     <meta http-equiv="content-type" content="text/html; charset=utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1" />  </head>  <body> <h1>hello world!</h1> <h2>a few facts world live in</h2> <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/97/the_earth_seen_from_apollo_17.jpg/640px-the_earth_seen_from_apollo_17.jpg" /> </body> </html> 

css:

img {     width: 300; }  h1 {     font-family: georgia;     background-color: red; } 

i have saved html , css in same folder. css file named stylesheet.css.

i able edit not through css file means css file , html linked somehow can't seem edit images. me!

the issue units. 300 of what? need add % or px or em.

img{   width:300px; } 

fiddle 300px https://jsfiddle.net/jl7lqfv8/


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -