|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Just to answer your question quickly, here's how it works:
PHP Code:
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 |
|
#3
|
|||
|
|||
|
its still not working. i dont get what's goin on..
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
the only code that is in the .css file is this, as i stated earlier:
body { color: white; background: black; } |
|
#6
|
|||
|
|||
|
Quote:
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.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > help with linking to an outside .css page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|