extern CSS-File not found

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
ets-freak
Posts: 5
Joined: October 26th, 2012, 3:44 pm

extern CSS-File not found

Post by ets-freak »

Hi all,

first off: if there is already an post about this, please excuse me then.

Well my problem:

I got an project and that is an homepage for an 3D-Game named as RLC (not ment as advertising). I want create an extern CSS-File, but FireFox didn't found the file both I said following behind the title-tag in quellcode:

Code: Select all

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


I got it on the same place as the index.html is but FF didn't found it.

The version of my FF is 16.0.2.

Regards

Stefan
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: extern CSS-File not found

Post by smsmith »

Try:

Code: Select all

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


Moving this to Web Development.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
ets-freak
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Re: extern CSS-File not found

Post by ets-freak »

Thank you very much it worked but now is my problem, FF don't show anymore my background-image.

Edit by my own: sometimes is an software stupid enough lol:

Had no background-image ok, I putted it directly in body-tag there turned my links in blue and stayed like this.
Then I putted it back in css-file and it turned just like I want to have this. Funny lol but I think it's solved now - Thank you very much ;)

Regards

Stefan
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: extern CSS-File not found

Post by BruceAWittmeier »

This would be my reply.
http://gotnarcosis.com/brucewittmeier/t ... dtest.html

With an image of this size you might consider adding this to the body/css.
background-position: center top;

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
 
   <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
   <title>bodybackgroundtest</title>
 
   <style type="text/css">

#wrapper {
  background-color: #ffff99;
  width: 544px;
  height: 628px;
  margin-right: auto;
  margin-left: auto;
}

body{
background-image: url(http://i614.photobucket.com/albums/tt230/ero-the-entertaiiner12/Homepage/background_image_zps0c756bee.jpg);
background-position: center top;
}

   </style>
</head>

<body>
<div id="wrapper">
<p> Body content here </p><br>
</div>
</body>
</html>
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
ets-freak
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Re: extern CSS-File not found

Post by ets-freak »

Didn't worked Bruce. Just a white background as a sign for "not found" - but I made it now in the body-tag and now is it shown.
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: extern CSS-File not found

Post by BruceAWittmeier »

Im curious - which didnt work? The link and code should be exactly the same.

This also works putting it in the body tag.
http://gotnarcosis.com/brucewittmeier/t ... tBody.html

Can you post the page you are using?
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
ets-freak
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Re: extern CSS-File not found

Post by ets-freak »

So I just made it to on every file, in this way it works. But not in the way if I put this info in CSS-File. That I ment.
And I do it with Windows Editor and first in Offline-Modi.
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: extern CSS-File not found

Post by BruceAWittmeier »

The syntax for each is slightly different from the other. You cant use 1 statement in both locations.

Code: Select all

Use this in CSS:

body{
background-image: url(http://i614.photobucket.com/albums/tt230/ero-the-entertaiiner12/Homepage/background_image_zps0c756bee.jpg);
background-position: center top;
}

or...

Use in the body:

<body style="color: rgb(0, 0, 0); background-position: center top; background-color: rgb(255, 255, 255); background-image: url(http://i614.photobucket.com/albums/tt230/ero-the-entertaiiner12/Homepage/background_image_zps0c756bee.jpg);">

I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
ets-freak
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Re: extern CSS-File not found

Post by ets-freak »

Well I took the body-tag option. However it's shown now and thank you both for helping me ;)
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: extern CSS-File not found

Post by BruceAWittmeier »

You're welcome. Glad you got it working. :)
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
Post Reply