View Full Version : html/css

Feb 23rd, 2010, 10:12 PM
please help me attach my css file and images to my html files!
I have just built a site using html/css files. when I test them in IE8 and Firefox,they are totally stable.
However I cannot get the paths right using the ftp transfer. I have tried uploading all the files seperately into the public dir;
creating a new folder in the public dir and putting the complete folder containging all my files in it;
and putting the html files and the css files in the public dir along with the folders containing the images - these are directed in the html; img/band.png.
i think I have tried every combination possible so far!
when i view my index page on line via the server, the style is missing and there are no images.
i have the following declartion at the top of the html pages;



<title>Sixty Fold - Home</title>

<meta http-equiv="Content-Type" content="text/html;

<link href="style.css" rel="stylesheet" type="text/css">


and the style sheet is:

<style type="text/css">



im sure that its something simple that Im doing wrong! Am I missing something from the top of my css file?
On my hard drive, the file containing my site has the images in a seperate folder (img) - but the html pages cant find them via the server when I upload the images into a folder called img.

Feb 24th, 2010, 12:05 AM
Hello carolannej,
It can get confusing, can't it?
This statement here - <link href="style.css" rel="stylesheet" type="text/css"> - is linking a .css file that is in the same directory as your index.html is in. Does that help?

Can we get the link to the site to hunt around for it?

It may be just a simple error that the validator can find for you. Check the links about validation in my sig below.


Feb 24th, 2010, 12:35 AM
thx for replying.
Ive tried putting the css. file in the style folder of the public dir on the server and added the relevant path: in fact, Ive tried putting it in every location on the server and adding the path: these are the paths ive tried:
<link href="style/style.css" rel="stylesheet" type="text/css">
<link href="/style/style.css" rel="stylesheet" type="text/css">
<link href="ESW/style/style.css" rel="stylesheet" type="text/css">
<link href="/ESW/style/style.css" rel="stylesheet" type="text/css">
<link href="public/ESW/style/style.css" rel="stylesheet" type="text/css">
<link href="/public/ESW/style/style.css" rel="stylesheet" type="text/css">
<link href="sixtyfold.co.uk/public/ESW/style/style.css" rel="stylesheet" type="text/css">
and all other combinations of this path like, sixtyfold.co.uk/style.css....
its driving me nuts! do you want the index.html and the css file? the link to the page is: http://www.sixtyfold.co.uk/
As I said, the sheet is rendering fine when I test on IE & Firefox, so its definately a pathway problem......
thx again

ps. If you're going to validate the syntax for the html....there'll be oozings of errors as Ive not yet added size & alt text for images..Ive made the site for a friend's band and have to make sure he's happy with the layout and size of imgs etc......just thought Id better add that!

Feb 24th, 2010, 12:45 AM
Your stylesheet path is incorrect. Currently it’s “styles/style.css” in your stylesheet link. If I remove the “styles/” part it’s working.

The images problem is related to the spelling of the file extension. http://www.sixtyfold.co.uk/img/trism.PNG is not the same as http://www.sixtyfold.co.uk/img/trism.png. You have all extensions uppercase but they need to be lowercase. In the HTML file obviously the (relative) image path must look like “img/image.png”.

Feb 24th, 2010, 01:22 AM
no way!
I swear it was the 1st thing I tried!and I tried it like that again and again for 3 days running b4 going through the other combos! :0
thx ever so much, i feel totally stupid now! Im going to change the imgs to lower case now and hopefully should be OK!
check it out in aout an hr or so!!!!!!!

Feb 24th, 2010, 04:53 AM
Your doctype is also incorrect. It's for XML applications only. If you insist on using the XHTML doctype, use this one:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"