Welcome Guest ( Log In | Join )

Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide. Want to reply to a topic, start a new one, or remove the advertising? Join today (always free).
      
 
Reply to this topicStart new topic
Linking my site to the CSS file
inferlogic
post Jun 20 2008, 03:18 AM
Post #1


Member
**
Posts: 15
From: United Kingdom
OS: windows Vista



Hi guys.
I just have a quick question. after building my website on my computer i could easily link my external CSS file to my site by specifying it's location in the head tags. I have now uploaded my website to a host site and I can't seem to link my CSS file to my pages anymore and my pages display without CSS! I have changed the location in the header tags to what I believe to be correct but its still not working.

On the host site
My index page is located in httpdocs/index.html
My CSS file is located in httpdocs/css/default.css

My head tags read the following:

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Signify Promotions</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="httpdocs/css/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
font-size: xx-large;
font-weight: bold;
}
.style3 {
font-size: 34px
}
.style5 {
font-size: large
}
.style6 {color: #AD32FF}
.style8 {font-size: 9px}
-->
</style>

Is the problem simply specifying the location to my CSS file in the head tags?

Any feedback would very much appreciated.

Thanks
Taz
Go to the top of the page
 
+Quote Post
Metallica
post Jun 20 2008, 03:59 AM
Post #2


Spyware Veteran
Group Icon
Posts: 20,730
From: Netherlands
OS: XP Pro & Vista Ultimate



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

That looks wrong. If the situation is as you described, this should work.
CODE
<link href="css/default.css" rel="stylesheet" type="text/css" />


Go to the top of the page
 
+Quote Post
inferlogic
post Jun 20 2008, 04:14 AM
Post #3


Member
**
Posts: 15
From: United Kingdom
OS: windows Vista



Yess! that has fixed it! Thank you very much Metallica I knew it was something fairly simple!

Thanks
Taz
Go to the top of the page
 
+Quote Post
Metallica
post Jun 20 2008, 04:27 AM
Post #4


Spyware Veteran
Group Icon
Posts: 20,730
From: Netherlands
OS: XP Pro & Vista Ultimate



Glad I was able to help.
You may assume I learned that one from experience.
Uploading the files and thereby messing up the releative paths. Been there, done that. smile.gif
Go to the top of the page
 
+Quote Post
inferlogic
post Jun 20 2008, 04:37 AM
Post #5


Member
**
Posts: 15
From: United Kingdom
OS: windows Vista



Hi Thanks again.

Is it normal for your CSS to veiw properly on your computer but when uploaded to the host some of the styles don't display such as in my case all that the CSS has done is the layout, it has disregarded the colours for some reason! is this common?

Cheers
Go to the top of the page
 
+Quote Post
Metallica
post Jun 20 2008, 04:47 AM
Post #6


Spyware Veteran
Group Icon
Posts: 20,730
From: Netherlands
OS: XP Pro & Vista Ultimate



Can you give us a link to your site?
And tell us what's wrong?
There shouldn't be any big differences.
At worst some browser specific things, but nothing basic like colors.
Go to the top of the page
 
+Quote Post
inferlogic
post Jun 20 2008, 05:25 AM
Post #7


Member
**
Posts: 15
From: United Kingdom
OS: windows Vista



my website is www.signifypromotions.co.uk

I have attached a sample of what the website is supposed to look like
it just seems to be missing the colouring? odd

Thanks

This post has been edited by inferlogic: Jun 20 2008, 05:32 AM
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
 
+Quote Post
Metallica
post Jun 20 2008, 06:04 AM
Post #8


Spyware Veteran
Group Icon
Posts: 20,730
From: Netherlands
OS: XP Pro & Vista Ultimate



I see. It looks like these lines in your css don't work properly:
CODE
background: #FFFFFF url(images/img01.gif) repeat-x;

Although the syntax is valid, can you try replacing them like this:
CODE
background-color: #fff;
background: url("../images/img01.gif");
background-repeat: repeat-x;

Try it with that one. If that works you can do the others as well.
Reason for edit: info from Major Payne
Go to the top of the page
 
+Quote Post
Major Payne
post Jun 20 2008, 06:11 AM
Post #9


Trusted Techie
Group Icon
Posts: 4,477
From: FEMA took "Tin Can" away!
OS: Win XP/Vista Home Premium. Backup PC: Commodore 64 with 300 baud modem!



Bad path:

<img src="file:///C|/Users/tariq/Documents/signify promotions/Website/smooth/images/ad_120x600.jpg" alt="" width="120" height="600" />

Empty <li></li> pair.

20 minor HTML errors.


Broken images:

http://www.signifypromotions.co.uk/

1. http://www.signifypromotions.co.uk/css/images/img01.gif
2. http://www.signifypromotions.co.uk/css/images/img04.gif
3. http://www.signifypromotions.co.uk/css/images/img02.gif
4. http://www.signifypromotions.co.uk/css/images/img02.gif
5. http://www.signifypromotions.co.uk/css/images/img02.gif
6. http://www.signifypromotions.co.uk/css/images/img02.gif
7. http://www.signifypromotions.co.uk/css/images/img02.jpg
8. http://www.signifypromotions.co.uk/css/images/img04.gif
9. http://www.signifypromotions.co.uk/css/images/img06.gif
10. http://www.signifypromotions.co.uk/css/images/img07.gif
11. http://www.signifypromotions.co.uk/css/images/img08.gif
12. http://www.signifypromotions.co.uk/css/images/img07.gif
13. http://www.signifypromotions.co.uk/css/images/img08.gif
14. http://www.signifypromotions.co.uk/css/images/img04.gif
15. http://www.signifypromotions.co.uk/css/images/img06.gif
16. http://www.signifypromotions.co.uk/css/images/img04.gif
17. http://www.signifypromotions.co.uk/css/images/img06.gif
18. file:///C|/Users/tariq/Documents/signify%20promotions/Website/smooth/images/ad_120x600.jpg

Ron
Go to the top of the page
 
+Quote Post
inferlogic
post Jun 20 2008, 07:00 AM
Post #10


Member
**
Posts: 15
From: United Kingdom
OS: windows Vista



Hey Metallica Wow that fixed it again! thanks once again! Why didn't it work before? before it was on one line, now its on 3 lines! what's difference? why should it make a difference?

Hi Major Payne.
Thanks for your observation, i will also fix these.

Thanks guys
Taz
Go to the top of the page
 
+Quote Post
Metallica
post Jun 20 2008, 07:04 AM
Post #11


Spyware Veteran
Group Icon
Posts: 20,730
From: Netherlands
OS: XP Pro & Vista Ultimate



You're welcome. smile.gif

The difference is the relative paths again.
Major Payne spotted that.

background: url("../images/img01.gif");

../ goes up one level
you have to do that, because /images is not a subfolder of /css but they are in the same directory.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No new   15 / 708 24th June 2005 - 10:02 AM
Josiah started - last by Josiah
No New Posts   0 / 120 17th July 2007 - 09:54 AM
wayne christian started - last by wayne christian
No New Posts   2 / 1,333 27th February 2008 - 11:31 PM
HalfJax started - last by Metallica
No New Posts   0 / 47 16th November 2008 - 12:59 PM
fyre.fairy started - last by fyre.fairy

RSS Time is now: 3rd December 2008 - 12:19 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.