Grow your CSS skills. Land your dream job.

Formatting help with reading a CSV file & outputting to HTML

  • # September 2, 2008 at 3:12 pm

    I’m trying to make a small page that reads a CSV file (exported from excel) that gives me a list of my DVDs with an img that is a link to the file to start the movie. It actually works fine (needs some formatting tweaking), but as it is below, it lists the movies vertically (up & down). Anyone know how I can make it list them horizontally? For whatever reason I prefer it that way. I’m testing using IE btw, but Firefox would be preferred. I found this article on this site, http://css-tricks.com/how-to-create-a-h … ling-site/ and it pretty much does the horizontal scrolling like I want, but now I just need to incorporate the automatic parsing of the .csv file. Any help would be appreciated. Thanks.

    movies-test.html
    =====
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> Graphical list </title>
    </head>
    <body bgcolor=#C0C0C0>
    <object ID=data classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
    <param nAme="DataURL" value="movies-test.csv">
    <param nAme="UseHeader" value="true">
    </object>
    <table CELLSPACING=25 datasrc=’#data’>
    <tr>
    <td><center>
    <a href= <span datafld=’location’> </span><img width=290 height=400 src=<span datafld=’picture’></span> </a><br>
    <span datafld=’name’> </span>
    <span datafld=’time’></span>
    </center></td>
    </tr>
    </table>
    </body>
    </html>

    movies-test.csv
    =====
    name,time,picture,location
    8mm,123,C:/DVDs/images/8mm_cs.jpg,D:/8mm/video_ts/video_ts.ifo
    12 Monkeys,131,C:/DVDs/images/12_monkeys_cs.jpg,E:/12_monkeys/video_ts/video_ts.ifo
    Thirteen Ghosts,91,C:/DVDs/images/13_ghosts_CS.jpg,E:/thirteen_ghosts/video_ts/video_ts.ifo
    13th Warrior,102,C:/DVDs/images/13th_warrior_cs.jpg,D:/13th_warrior/video_ts/video_ts.ifo
    16 Blocks,105,C:/DVDs/images/16_blocks_cs.jpg,H:/16_blocks/video_ts/video_ts.ifo

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".