473,322 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

CSS style sheet not linking to my HTML

1
I am new to CSS and HTML. I am studying an online tutorial that provides a sample HTML and CSS style sheet. When I save these two files to my computer in the proper format they do work. However, when I go into the CSS style sheet and change the color from #FF0000 to "blue" I get no results in the HTML. Any help is appreciated. Below are the two sets of HTML and CSS code
Expand|Select|Wrap|Line Numbers
  1. HTML:
  2. <html> <head> <title>My document</title> <link rel="stylesheet" type="text/css" href="http://bytes.com/style.css" /> </head> <body> <h1>My first stylesheet</h1> </body> </html>
  3.  
  4. CSS:
  5. body {
  6.       background-color: #FF0000;
  7.     }
May 19 '13 #1
2 2565
vijay6
158 100+
Hey LouDog, replace href attribute value by the location of your 'style.css' file in line number 2 in your code. For example href="style.css" (if both the files are in same folder).
May 20 '13 #2
Hey make sure the path is correct.....suppose if you have maintained different folders for your css,js and images then make sure the path is correct.....

For instance,if you have a folder in your desktop and within that folder you have various subfolders like css,images or js,then add these code to your html page:-
<link rel="stylesheet" type="text/css" href="css/your-css.css">

Hope this helps :)
Aug 23 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link...
1
by: Hank Flowers | last post by:
In trying to load a style sheet via JavaScript I ran into a problem...the style sheet doesn't load. This simple task has turned into a vexing problem. Here is the script and html: <html> <head>...
33
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
1
by: blue | last post by:
My app draws a bunch of tables on the page and has a form for the user to enter data and submit. The form is contained within a User Control called DecisionCtl. When they submit the form, a bunch...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
1
by: Warren Machanik | last post by:
I am having problems with applying a style on a style sheet. I have created a div and created a class. In the style sheet file I did the following: div.TopBar { background: Silver...
2
by: Warren Machanik | last post by:
I am a relative newbee I am having problems with applying a style on a style sheet. I have created a div and created a class. In the style sheet file I did the following: "div.TopBar {...
2
by: melvinsdayout | last post by:
I have been having problems with IE 7 not responding to changes in the style sheet it is linked to. My problem is that my site looks good in Firefox, and was looking good in ie7 via an statement...
1
by: abaybas | last post by:
I'm creating a page in which a certain "content" part of the page is refreshed using ajax. I do this by using a div#content, and it's child div#container. the code: ... ...
3
JnrJnr
by: JnrJnr | last post by:
I have a StyleSheet.css in my project with no errors (checked by jigsaw.w3.org/css-validator/). When I change a value in my style sheet the page doesnt respond to the change but when I remove the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.