MozillaZine

extern CSS-File not found

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

Post Posted October 26th, 2012, 3:53 pm

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

smsmith
Moderator

User avatar
 
Posts: 19441
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post Posted October 26th, 2012, 6:05 pm

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

Post Posted October 26th, 2012, 9:54 pm

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

BruceAWittmeier

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

Post Posted October 26th, 2012, 11:02 pm

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'm only here to Pay it Forward. ~

"I often take a very long windy road to my destination. When I arrive I often wonder how I missed the shortcut".

ets-freak
 
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Post Posted October 26th, 2012, 11:43 pm

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.

BruceAWittmeier

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

Post Posted October 27th, 2012, 6:55 am

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'm only here to Pay it Forward. ~

"I often take a very long windy road to my destination. When I arrive I often wonder how I missed the shortcut".

ets-freak
 
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Post Posted October 27th, 2012, 5:05 pm

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.

BruceAWittmeier

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

Post Posted October 27th, 2012, 7:59 pm

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'm only here to Pay it Forward. ~

"I often take a very long windy road to my destination. When I arrive I often wonder how I missed the shortcut".

ets-freak
 
Posts: 5
Joined: October 26th, 2012, 3:44 pm

Post Posted October 27th, 2012, 9:41 pm

Well I took the body-tag option. However it's shown now and thank you both for helping me ;)

BruceAWittmeier

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

Post Posted November 1st, 2012, 7:31 am

You're welcome. Glad you got it working. :)
~ I'm only here to Pay it Forward. ~

"I often take a very long windy road to my destination. When I arrive I often wonder how I missed the shortcut".

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 2 guests