CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 24th, 2004, 06:52 PM
drunkirishomer drunkirishomer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 drunkirishomer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
help with linking to an outside .css page

hello, i am new here, and this is my first post. i am working on adding css to my html website, so i was suggested to create a different .css file and put all the styles in there, and then just add a link in my .html files to my .css file. the link from the pages to the .css file is fine, i checked it over but here it is, please point out if i missed something. (by the way all my .html and my .css files are in the same directory.) here it is:

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

so my question is, how do i get the changes from when i save something in the .css file to go into the .html files. just for an example, could someone tell me how to make the background be black, and the text be white? please put it in html form. right now i have this in the .css file but nothing is changing:

body { color: white; background: black; }

is that right? or am i missing something?

Thanks for the help.

Reply With Quote
  #2  
Old June 25th, 2004, 02:48 AM
TheJim01's Avatar
TheJim01 TheJim01 is offline
Coconuts migrate?
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: http://middle.nowhere.com
Posts: 1,895 TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate Folder
Time spent in forums: 2 Weeks 5 Days 11 h 8 m 20 sec
Reputation Power: 1176
Just to answer your question quickly, here's how it works:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<
html>

<
head>

  <
title>Title</title>

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

</
head>

<
body>


</
body>

</
html


If you have the "body{ background: black; }" inside your style.css file, and are using a modern browser, then when you open the page, the background should be black. If it doesn't work, make sure both your .html and .css files are in the same directory, and try again. If that doesn't work, get Firefox 0.9, and open your page with that.

For more information and tutorials on CSS, check out w3schools.com.

Hope this helped, and welcome to the forums.
__________________

Proud member of the T.S.N.B.U.F.L (tables should not be used for layout) alliance.

"Only use elements for their intended purpose. You wouldn't try to make coffee with a telephone, would you?" -Me

Reply With Quote
  #3  
Old June 25th, 2004, 04:51 PM
drunkirishomer drunkirishomer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 drunkirishomer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
its still not working. i dont get what's goin on..

Reply With Quote
  #4  
Old June 25th, 2004, 04:58 PM
Aronya Aronya is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 128 Aronya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 56 m 16 sec
Reputation Power: 5
One thing that almost always goes unstated, but can mess up a first-timer is the content of your CSS file. This file should not have any HTML markup. It is a simple text file listing the various items you are styling.

I think you have your CSS code right for the background & text (although you might want to reverse the order -you never know). Do you have any styling info left in your HTML code? Remove it if you do.

Reply With Quote
  #5  
Old June 25th, 2004, 05:33 PM
drunkirishomer drunkirishomer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 drunkirishomer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the only code that is in the .css file is this, as i stated earlier:

body { color: white; background: black; }

Reply With Quote
  #6  
Old June 25th, 2004, 06:26 PM
jacktasia jacktasia is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: Lawrence, Kansas [KU]
Posts: 1,559 jacktasia User rank is Corporal (100 - 500 Reputation Level)jacktasia User rank is Corporal (100 - 500 Reputation Level)jacktasia User rank is Corporal (100 - 500 Reputation Level)jacktasia User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 14 h 4 m 35 sec
Reputation Power: 9
Send a message via AIM to jacktasia
Quote:
Originally Posted by drunkirishomer
the only code that is in the .css file is this, as i stated earlier:

body { color: white; background: black; }



lets see a link to your page then. we can probably get it worked out then.
__________________
Jack
---------
use code tags

become vegetarian
python? yes, sir!
unarm.org
get firefox


If I helped you then please click the "" in the upper right-hand corner of my post.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > help with linking to an outside .css page


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT