cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie enquiry - uploading webpages so style sheets and images work

roseabsolute
Newbie
Posts: 4
Registered: ‎01-10-2011

Newbie enquiry - uploading webpages so style sheets and images work

I had a website a while back written using CSS and Xhtml.  I was an enthusiastic amateur and it was probably very clunky and inefficient, but it worked.  I wanted to upload it to my plusnet account as an archive.
I created a css folder and an img folder and added the html pages all inside htdocs/ on the server.  The pages show fine when I go to my web address but no style sheet or pics just plain text.
Any ideas as to what I have done wrong and how to fix it?
Many thanks in advance
7 REPLIES 7
Oldjim
Resting Legend
Posts: 38,460
Thanks: 787
Fixes: 63
Registered: ‎15-06-2007

Re: Newbie enquiry - uploading webpages so style sheets and images work

I suspect that your index.html file isn't correctly linking to the style and image directories
Also are the folders in the htdocs directory
What code are you using
roseabsolute
Newbie
Posts: 4
Registered: ‎01-10-2011

Re: Newbie enquiry - uploading webpages so style sheets and images work

When I first uploaded it I did:
htdocs/css/style.css
htdocs/img/img.jpg
htdocs/index.html
and changed nothing eg: <link rel="stylesheet" type="text/css" media="screen" title="TGB" href="css/style.css" />
<img src="img/ylaibo.jpg" alt=Ylaibo"" />

all I got was plain text
so I rewrote the instructions in the style sheet for referencing images and in the html doc for referencing style sheet and images as follows
<link rel="stylesheet" type="text/css" media="screen" title="TGB" href="htdocs/css/style.css" />
<img src="htdocs/img/cow.jpg" alt="[cow]" />
still got plain text
then I tried removing the css and img folders and just uploading all files directly into htdocs and changed the instructions to:
<link rel="stylesheet" type="text/css" media="screen" title="TGB" href="style.css" />
<img src="cow.jpg" alt="[cow]" />
and still got plain text.
As far as code goes..  was trying to write xhtml - it worked ok when I did it about 2-3 years ok.
Thanks for responding.

Oldjim
Resting Legend
Posts: 38,460
Thanks: 787
Fixes: 63
Registered: ‎15-06-2007

Re: Newbie enquiry - uploading webpages so style sheets and images work

For the earlier ones you don't put htdocs in the path as that is the root
I am not an expert and it is a few years since I did my wife's website but try this with the stylesheet in a folder called styles - using css as a folder name might cause problems

<link rel="stylesheet" type="text/css"
href="styles/style.css" />
<img src="cow.jpg" alt="[cow]" />
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Newbie enquiry - uploading webpages so style sheets and images work

Quote from: roseabsolute
htdocs/img/img.jpg
<img src="img/ylaibo.jpg" alt=Ylaibo"" />

Are those lines to be taken literally with the uploaded image file differently named from when used and misplaced double-quotes?
Rather than:

<img src="img/ylaibo.jpg" alt="Ylaibo" />

Did you upload the text files as ascii and the image as binary?
David
roseabsolute
Newbie
Posts: 4
Registered: ‎01-10-2011

Re: Newbie enquiry - uploading webpages so style sheets and images work

No not taken literally I was just showing folder in directory with first.
I can;t answer the second question as I have no idea what  you mean.  Embarrassed
jim:quote
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Newbie enquiry - uploading webpages so style sheets and images work

Quote from: roseabsolute
Quote
Did you upload the text files as ascii and the image as binary?

I can't answer (that) question as I have no idea what  you mean.   Embarrassed

This article explains the difference, in particular see the "Other Note" at the bottom.
That article relates to Core FTP; where you would find that information depends on which FTP program you used to upload the files.
David
roseabsolute
Newbie
Posts: 4
Registered: ‎01-10-2011

Re: Newbie enquiry - uploading webpages so style sheets and images work

Thank you both for your help.
I had been transferring using auto mode option, but when I chose ascii for text files and binary for the image files it all fell into place.
Grin