style sheet

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

style sheet

Post by D Willett »

Hi.
I'm trying to format a html table with a css stylesheet, unfortunately I'm not doing very well.. this is new ground to me.
Can any of the members assist and tell me where I'm going wrong?

Regards

Code: Select all

<html> 

<head> 
 
<title>A BASIC HTML FORM</title>  
<body>  
<link rel="stylesheet" type="text/css" href="table.css" /> 
<table border=1> 
<?php
$row = 1;
if (($handle = fopen('data.csv', 'r')) !== FALSE)
{
    echo '<table>';

    // Get headers
    if (($data = fgetcsv($handle, 1000, ',')) !== FALSE)
    {
        echo '<tr><th>'.implode('</th><th>', $data).'</th></tr>';
    }

    // Get the rest
    while (($data = fgetcsv($handle, 1000, ',')) !== FALSE)
    {
        echo '<tr><td>'.implode('</td><td>', $data).'</td></tr>';
    }
    fclose($handle);
    echo '</table>';
}
?> 

</table> 

</body>  
</html>
Cheers ...

Dave.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: style sheet

Post by Rudi »

Always willing to assist, but this is Greek (or rather Roman Numerals) to me!! :scratch:
Sorry Dave.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: style sheet

Post by D Willett »

Cheers Rudi.

Its really interesting stuff, unfortunately I haven't the foggiest either ! Might as well be written in Hiero-Klingon !!!
:-)
Cheers ...

Dave.

User avatar
Jezza
5StarLounger
Posts: 847
Joined: 24 Jan 2010, 06:35
Location: A Magic Forest in Deepest, Darkest, Kent

Re: style sheet

Post by Jezza »

What are you trying to do as the code is pointing towards a stylesheet called table.css which resides in the same location as the html file?

Can you attach the code for the CSS please?
Jerry
I’ll be more enthusiastic about encouraging thinking outside the box when there’s evidence of any thinking going on inside it