4 Replies - 650 Views - Last Post: 18 December 2008 - 06:13 PM

#1 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

CSS isnt working?

Post icon  Posted 17 December 2008 - 09:40 PM

On my hosting service www.ulmb.com i put my files in the html file and css but the css isnt working when i open up the html file. But when i open the file on my computer the css works fine... heres the code:

html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtm11/DTD/xgtm11-strict.dtd">
 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 	

<head>

<meta http-equiv="Content-Type" content="text/html; chatset=ISO-8859-1">
<meta http-equiv="Content-Script-Type" content="text/Javascript">

		<title>Sclyfe</title>
		<link type="text/css" rel="stylesheet" href="index.CSS">
		
</head>

<body>
<h1><center>Sclyfe</center></h1>

<div id="alternate">
<marquee behavior="alternate" direction="left" scrollamount="17">Welcome to Sclyfe! </marquee>
</div>

<!--time created by sly-->
<script type="text/javascript">
  var currentTime = new Date()
  var hours = currentTime.getHours()
  var minutes = currentTime.getMinutes()

  var suffix = "AM";
  if (hours >= 12) {
  suffix = "PM";
  hours = hours - 12;
  }
  if (hours == 0) {
  hours = 12;
  }

  if (minutes < 10)
  minutes = "0" + minutes

  document.write("<b>" + hours + ":" + minutes + " " + suffix + "</b>")
</script>


<script type="text/javascript">
 confirm("By clicking ok, you are stating that you will abide by Sclyfe's rules and read them as soon as you get on.")
</script>


<script type="text/javascript">
<!--
function displayMessage(firstName) {
	alert("Hello " + firstName + ", hope you like Slyfe!")
}
//-->
</script>

<form>
First name:
<input type="input" name="yourName" />
<input
  type="button"
  onclick="displayMessage(form.yourName.value)"
  value="Display Message" />
</form>


<hr>

	<p><center>
   Hello and welcome to sclyfe! we are
   programming site with many features to offer such as codes, tutorials,
   forums, and games.
   </p></center>
   
 <hr>
 
   <div id="links">	
	<li><a href="comingsoon.html"><em>Coming Soon<em></a></li>
	<li><a href="games.html"><em>Games<em></a></li>
	<li><a href="myprograms.html"><em>My Programs<em></a></li>
	<li><a href="http://sclyfe.darkbb.com/"><em>sclyfe Forums<em></a></li>
	<li><a href="math.html"><em>Math Formula Solvers<em></a></li>
</div> 

<br>

<div id="ofday">
<h2><center>Game of the Week</center><h2>
</div>

<div id="gameofday">
<center>
<table border="1" bordercolor="#FFCC00" style="background-color:black" width="10" cellpadding="5" cellspacing="5">
	<tr>
		<td><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="250" height="166">
<param name="menu" value="false" />
<param name="movie" value="http://www.miniclip.com/swfcontent/freegames/loader.swf?url=redbeard.swf&name=Red Beard&icon=%2Fimages%2Ficons%2Fredbeardmedicon.jpg&w=550&h=366" />
<param name="quality" value="high" />
<embed src="http://www.miniclip.com/swfcontent/freegames/loader.swf?url=redbeard.swf&name=Red Beard&icon=%2Fimages%2Ficons%2Fredbeardmedicon.jpg&w=550&h=366" menu="false" quality="high" width="390" height="260" name="miniclipGame" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></td>
	</tr>
</table>
</center>
</div>

<br>

	<div id="copyright">Copyright &copy; 2008 sclyfe Inc. All rights reserved.
</div>

	</body>

</html>



heres the CSS:
body {
		background-repeat:	no-repeat;
		background-color: white;
		background-image: url(images/dark.jpg);
		font-family: arial;
		color: white;

}


p {
	font-size: 90%;
	color: blue;
}

em {
		font-family:	georgia;
		font-weight:	bold;
		text-decoration:	underline;
		
}
		
#copyright {
color:	white;
font-size:	10px;
text-align:	center;
position: absolute;
bottom:	-130px;
left:	381px;
}


#links {
		line-height:	1.9em;
		font-style:		bold;
		font-family:	Georgia;
		border-color: white;
		border-width:	1px;
		border-style:	solid;
		background-image:	url(http://kumo.swcp.com/synth/images/black-background.jpg);
		background-repeat:	no-repeat;
		padding:	15px;
		margin:		0px 10px 10px 10px;
		float:	left;
		position: absolute;
		padding-bottom: 275px;
		color:			#00ffff;

}

#links a:hover {
	background: #e0ffff;
	color: #33333;
}

#links a:link {
	color:	#007e7e;
}

#links a:visited {
	color:	#708090
}

#alternate {
		color: #e0ffff;
		font-style: bold;
		font-family: arial;
}

#ofday {
		color: yellow;
}


		



Is This A Good Question/Topic? 0
  • +

Replies To: CSS isnt working?

#2 b.ihde  Icon User is offline

  • D.I.C for life
  • member icon

Reputation: 43
  • View blog
  • Posts: 1,070
  • Joined: 29-September 08

Re: CSS isnt working?

Posted 18 December 2008 - 01:08 AM

Hi!

If you are sure, the css file is in the same folder as the hmtl files, try this:


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



regards

B.Ihde
Was This Post Helpful? 0
  • +
  • -

#3 mocker  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 50
  • View blog
  • Posts: 466
  • Joined: 14-October 07

Re: CSS isnt working?

Posted 18 December 2008 - 10:26 AM

make sure the filename is the same. In your code you are linking to "index.CSS" which is not the same as "index.css"
Was This Post Helpful? 0
  • +
  • -

#4 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

Re: CSS isnt working?

Posted 18 December 2008 - 04:26 PM

i changed it to .css amd now it works besides the background... do u know why?

background-image: url(images/dark.jpg);

thats what it says in my css for it...
Was This Post Helpful? 0
  • +
  • -

#5 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

Re: CSS isnt working?

Posted 18 December 2008 - 06:13 PM

*RESOLVED*
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1