Ok, I am trying to get a CSS file to work with my website but it won't load when I goto my page. All it really does is change the color of some of the text but nothing is happening. I've uploaded it to the server and is in the /www/ysfdata.freefronthost.com/main.css. I linked it EXACtLY like the way three of my books said. It just changes the color of the text that is surrounded by the span and is the class of infoheaders my css file looks like this:

span.infoheaders {color: red;}

this is the HTML file it is in the same dir as the css file:

The text I am tring to edit is red.

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

<body background="3 Airplanes.gif">
<h1><b><center>YSFLIGHT EVENTS</center></b>


<table width="100%" border="1">
	<tr bgcolor="#009790" >
		<td width="180">
		<center><a href="http://s14.invisionfree.com/ysfdata">Forums</a></center>
		<td width="180">
		<center><a href="http://ysflight.com">YSFLIGHT Homepage</a></center>
		<td width="180">
		<center><a href="http://freefronthost.com">Webmaster Login</a></center>
		<td colspan="3">

<center><table border="1">
                <h1><center><bold><font color="red">Attention all noobies!</font></bold></center></h1>
<p>If you are new to YSFLIGHT but want to play with us then feel free to download the game at the link for their homepage. After that go to <a href="inst.htm">Noobies Guide to YSFLIGHT</a> If the game runs slowly when you are playing(in the Open-GL version) then this means that your card is not Open-GL compatable. But don't fret! Just use the non-open gl version. This version has worse graphics but runs way faster on a Open Gl incompatable computer.

		<p>Times cannot be garunteed but I most likely will be on sometime in the range.
		<p>Ill be on IM if I can host at that time.
		<p>AIM: danizzil14
		<p>Yahoo: daniel31191@sbcglobal.net
		<p>MSN: same as yahoo's
                <p>-Date: 11/11/2005 Time: 4:00 Rules: WW2 planes 1st 10 mins then convert to F-22 only w/missiles for 10 more mins then flying whatever you want w/missiles.
		<span class="infoheaders"><p>-Date: 11/12/05  Time:Any time I'm on</span>  Rules:Theme will be along the lines of teams today. The first bit tof the game we will fly helocopters or harriers and fly a close air defence mission. Start out on the RW for this. We will then go to an intercept mission and we will fly with F-14's only. Start out on the carrier for this.(Only one 500 lb bomb is needed to destroy it so get the bombes quickly.) After that we will fly endurance mode with only F-18's yet again you will take off from the carrier. When we are done we can fly free for all mission and any plane you want.
		<p>-Date: 11/13/2005	Time: Anywhere between 2:30--7:00	Rules: Okay today we will be doing a stunt flying day for the first 30-45 mins. After that we will do free for all with missiles for the rest of the time.
                <p>-Date: 11/16/2005    Time: Anywhere between 7:00-8:00 or 9:00PM but it might not happen because I have somewhere to go in that time. Rules: Most likely a free for all but mabie a WW2 plane match for the first 30 mins.

		<p>-Date:11/17/2005	Time:After School(depends on how much HW I have)till around 9:00PM	Rules: Helos(no missiles)then a free for all jets(w/missiles) then to finish off, a WW2 plane battle.


P.S. I've tried absolute linking and it still didn't work.

Help appreciated :cheesy:

11 Years
Discussion Span
Last Post by tgreer

That looks correct. Make sure that your .css file doesn't contain any HTML tags at all, only style declarations.

Note: when I look at your actual CSS, you're missing a semi-colon:

http://ysfdata.freefronthost.com/main.css shows: span {color: red}

Also, you have a system path to the CSS in your link, rather than an HREF. You need to provide a path that the Web Browser would understand, not the path the web server uses.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.