Page 1 of 1

CSS WTF?

Posted: 2009.03.02 (01:20)
by squibbles
So I have to make a tutorial page for my major assessment piece...but I'm having serious trouble.

Index.php

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP Tutorial</title>
<link rel="stylesheet" type="text/css" href="resources/css.css">
</head>

<body>

<table border="3" width="40%">
<td>
fgjfhnxcgn
</td>
</table>

</body>
</html>
css.css

Code: Select all

@charset "utf-8";
/* CSS Document */

body
{
	background-color:#007599;
	z-index:0;
}

table
{
	background-color:#3399CC;
	border-color:#2A92C3;
	border-width:6px;
	margin-left:50%;
	border-style:solid;
}
In firefox, the text in the table does not appear (O_o)
In IE, there is a less unusual error of alignment...I can fix that myself, but I can't work out what do do about my problem with firefox...any tips?

And yes, I do plan on changing the colours.

Re: CSS WTF?

Posted: 2009.03.02 (03:18)
by LittleViking
Looks the same in every browser I test it in, and there's no reason the text should be invisible from what you have there.

Re: CSS WTF?

Posted: 2009.03.03 (20:56)
by smartalco
You are missing one crucial thing there, the <tr> tags.
Tables require you define them, and then the rows, and then the cells within each row, so your code should really be something like this

Code: Select all

<table>
   <tr>
      <td>fdskajl</td>
   </tr>
</table>

Re: CSS WTF?

Posted: 2009.03.04 (06:20)
by squibbles
Well, I worked out what the problem was...I had a different, older version of the file open in one of the browsers. xo

Thanks for the help though guys.