html - Why don't my img display and CSS apply? -


i'm begining in html/css, i'm trying make small website i've got issue : when try display picture on index.html page, nothing except alt shown. same happens link css thing.

it seems web browser isn't able file, maybe problem permissions/rights on computer... folders, every folders actually, on computer have square on "read only" on proprieties (impossible uncheck).

i googled it, nothing works...

i'm on windows 7, tried browsers (ie8/9, ff, chrome, opera, safari)...

my html was:

<html>     <head>         <link type="text/css" rel="stylesheet" href="stylesheet.css"/>         <title></title>     </head>     <body>         <img href="image.jpg" alt"alternative text" />         <div></div>     </body> </html> 

my css was:

div {     border-radius:5px;     width:960px;     height:45px; } 

this means web server cannot image path have given. img tag have provided image found if resides in same folder of page showing image. use src instead of href.

 <img src="image.jpg" alt="alternative text" /> 

folder structure;

 index.html  image.jpg 

if image inside folder have do

 <img src="images/image.jpg" alt="alternative text" /> 

folder structure

 index.html  images // folder     image.jpg 

you can set absolute path image below

 <img src="http://www.yourwebsite.com/image.jpg" alt="alternative text" /> 

folder structure

index.html image.jpg 

if image in folder

 <img src="http://www.yourwebsite.com/images/image.jpg" alt="alternative text" /> 

folder structure

index.html images // folder    image.jpg 

hope helped


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -