473,399 Members | 3,888 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,399 software developers and data experts.

Why won't my style sheet work?

I need help with my css style sheet. I have be trying to follow these tutorials online and I feel I have followed their instructions to a "t". The problem I am having is the browser won't recognize my style sheet. Below is how I have everything set up. Thanks for your help, I am new at all of this.

Example:(File saved as index.html on notepad)

html>
<head>
<title>my first go at css</title>

<link rel="stylesheet" href="C:\Users\owner\Desktop\site files\style.css" type="text/css">
</head>

<body>
<h1>Thhis is a header</h1>

<p>This is a paragraph</p>



</body>
</html>

Example:(File saved as style.css and is in the same folder on my desktop as my file, index.html)

h1 {

color: blue;

}

(So why won't the simple header turn blue when I refresh my page in Google Chrome?)
May 5 '12 #1
2 7911
harshmaul
490 Expert 256MB
A few things to check.
Is the css file called style.css, and not style.css.txt
You can confirm this by forcing windows to show extensions
Link to do that here

next use this link tag instead,
<link rel="stylesheet" href="style.css" type="text/css">

Let me know if you are still having problems
May 14 '12 #2
Thanks for your reply. I went ahead and took the easy way out and downloaded Kompozer to give me some training wheels to work with. I am still having problems with unwanted space between my image and the cell I have the image in......Code is below if you feel like helping me out with this one. I have been trying to figure out how to eliminate the space all day, but I have been unsuccessful at my attempts. I am sure it is something easy and dumb but I just can't see what it is.


<!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>small business marketing services | marketing comapnies</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
alink="#000099" link="white" vlink="#990099">
<table
style="width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellspacing="0">
<tbody>
<tr>
<td colspan="6"
style="background-color: rgb(0, 96, 192); height: 24px; width: 888px; text-align: center; vertical-align: middle;"></td>
</tr>
<tr>
<td colspan="6"
style="height: 285px; width: 888px; text-align: left; vertical-align: middle;"><img
style="width: 888px; height: 277px;"
alt="Contact us for a free marketing consultation by calling 303-351-2434."
src="file:///C:/Users/owner/Desktop/site/images/marketing.gif"></td>
</tr>
<tr>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="index.html">Home</a></td>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="aboutus.html">About Us</a></td>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="services.html">Services</a></td>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="faq.html">FAQ</a></td>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="contact.html">Contact Us</a></td>
<td
style="height: 24px; width: 143px; text-align: center; vertical-align: middle; background-color: rgb(0, 96, 192);"><a
href="casestudies.html">Case Studies</a></td>
</tr>
<tr>
<td style="height: 350px; width: 888px;" colspan="6"><br>
<br>
<h4><span style="font-family: Arial;"></span></h4>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;</p>
</td>
</tr>
<tr>
<td style="height: 0px;" colspan="6"></td>
</tr>
<tr align="center">
<td colspan="6"><span style="font-family: Arial;">Created
by FOCUS Consulting Group, LLC. © 2012 All Rights Reserved.</span></td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
May 15 '12 #3

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

Similar topics

38
by: Ken Davies | last post by:
I'm relatively new to style sheets but I've been unable to find the answer to a - hopefully - simple question. Is it valid to use more than one <LINK REL=STYLESHEET..... in a document. Basically...
5
by: MrNobody | last post by:
I am trying to make a method that will autosize columns to fit the longest text contained in a DataGrid. My plan was to take the width of an arbitrary character (underscore, in this case) and...
1
by: Selden McCabe | last post by:
I'm trying to use a style sheet and am missing something. In one project the following procedure works, and in another it won't: 1. Create a new Webform 2. Drag Styles.css to the Webform's...
2
by: Paul | last post by:
Hi I have a control that is created with java script and am just trying to move it to the left. I tried the following but it had no effect, thanks. <input type="text" size ="26" id = "timer" value...
1
by: mfurey | last post by:
Can someone look at the following page and tell me what I did wrong with the style sheet linkage, or perhaps the document type declaration? I had this working properly off of one server, but now...
5
by: Sean | last post by:
I have some themes with stylesheets, I have changed some of those style sheets and in fact have even completely removed some graphics completely from hard drive and yet if I use that class name the...
2
by: Nathan Sokalski | last post by:
I have the following code which allows you to drag a div in IE, and have it then move back to it's natural position when you release the mouse button: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...
3
by: vozzek | last post by:
Hi all, I've got a simple function I can't get to work. I've got two checkboxes that are associated with two textarea inputs. I disable the text areas initially. When the associated checkbox is...
1
by: Jim in Arizona | last post by:
I moved a VB.NET 2.0 app from the wwwroot on one machine to another. I re-setup all databases and all would appear to work at it should but when I run the index.aspx page, I get this: The XML...
1
by: alexb4u | last post by:
good day, guru! I have a problem regarding with css and here it is, I do have a web page and in that page i have a external css files called. It works but when I add another external css file link it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.