Columns

Discussion in 'HTML' started by Brian Robertson, Nov 19, 2007.

  1. I am redesigning a web page that runs to some 1800 pages consisting
    mostly of tables to show data. (Hey, there may be better ways of doing
    it than tables, but what the hell?) I have tried converting the original
    pages from HTML formatting to CSS, but it is hard and frustrating work,
    ultimately doomed to failure IMHO. I may as well start at square one
    with a new layout.

    So, here would be some basic code:

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-gb">
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    <link rel="stylesheet" type="text/css" href="style3.css">
    </head>

    <body>

    <table border="1" cellpadding="0" cellspacing="0"
    style="border-collapse: collapse" width="100%" id="table1">
    <tr>
    <th>Section of Line</th>
    <th>Opened</th>
    <th>Closed</th>
    <th>Notes</th>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>

    </body>

    </html>

    And here is the start of a style sheet:

    body {
    background-color: rgb(223,174,45);
    }

    table {
    font-family: arial;
    font-size: 12.5px;
    background-color: rgb(248,239,182);
    empty-cells: show;
    width: 900px;
    }

    What I want to know is this: how can I apply particular attributes to
    columns rather than rows, or can't I, or is there a next best fix?

    Brian.
    Brian Robertson, Nov 19, 2007
    #1
    1. Advertising

  2. Brian Robertson

    dorayme Guest

    In article <wpp0j.41344$>,
    Brian Robertson <brian@[nospam].com> wrote:

    > I am redesigning a web page that runs to some 1800 pages consisting
    > mostly of tables to show data. (Hey, there may be better ways of doing
    > it than tables, but what the hell?)


    There is no better way to make a table than to use the tool that
    is designed to make them, tables.


    > I have tried converting the original
    > pages from HTML formatting to CSS, but it is hard and frustrating work,
    > ultimately doomed to failure IMHO. I may as well start at square one
    > with a new layout.


    You can at least not have inline styles as in your code, hive
    those off to the css in the head or otside css linked file.

    >


    > What I want to know is this: how can I apply particular attributes to
    > columns rather than rows, or can't I, or is there a next best fix?



    You might have to study col and colgroup:

    http://www.htmldog.com/guides/htmladvanced/tables/

    Or if you want low tech, it is really simple, you simply class
    all the cells in each col and say what colour background you want
    in each cell:

    http://netweaver.com.au/alt/robertson.html

    --
    dorayme
    dorayme, Nov 20, 2007
    #2
    1. Advertising

  3. dorayme wrote:
    > In article <wpp0j.41344$>,
    > Brian Robertson <brian@[nospam].com> wrote:
    >
    >> I am redesigning a web page that runs to some 1800 pages consisting
    >> mostly of tables to show data. (Hey, there may be better ways of doing
    >> it than tables, but what the hell?)

    >
    > There is no better way to make a table than to use the tool that
    > is designed to make them, tables.
    >
    >
    >> I have tried converting the original
    >> pages from HTML formatting to CSS, but it is hard and frustrating work,
    >> ultimately doomed to failure IMHO. I may as well start at square one
    >> with a new layout.

    >
    > You can at least not have inline styles as in your code, hive
    > those off to the css in the head or otside css linked file.
    >
    >
    >> What I want to know is this: how can I apply particular attributes to
    >> columns rather than rows, or can't I, or is there a next best fix?

    >
    >
    > You might have to study col and colgroup:
    >
    > http://www.htmldog.com/guides/htmladvanced/tables/
    >
    > Or if you want low tech, it is really simple, you simply class
    > all the cells in each col and say what colour background you want
    > in each cell:
    >
    > http://netweaver.com.au/alt/robertson.html
    >


    Hiya. Thanks for that. Pretty much what I suspected. Just wanted
    confirmation really. It is going to be a hard slog, but I am a total
    convert to CSS and think it will be worth the effort.

    The inline style info is there thanks to FrontPage and will be removed.
    Thanks for reminding me though.

    Brian.
    Brian Robertson, Nov 20, 2007
    #3
  4. Brian Robertson

    a-ok-site Guest

    On Nov 19, 5:57 pm, Brian Robertson <brian@[nospam].com> wrote:
    > I am redesigning a web page that runs to some 1800 pages consisting
    > mostly of tables to show data. (Hey, there may be better ways of doing
    > it than tables, but what the hell?) I have tried converting the original
    > pages from HTML formatting to CSS, but it is hard and frustrating work,
    > ultimately doomed to failure IMHO. I may as well start at square one
    > with a new layout.
    >
    > So, here would be some basic code:
    >
    > <html>
    >
    > <head>
    > <meta http-equiv="Content-Language" content="en-gb">
    > <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    > <meta name="ProgId" content="FrontPage.Editor.Document">
    > <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    > <title>New Page 1</title>
    > <link rel="stylesheet" type="text/css" href="style3.css">
    > </head>
    >
    > <body>
    >
    > <table border="1" cellpadding="0" cellspacing="0"
    > style="border-collapse: collapse" width="100%" id="table1">
    > <tr>
    > <th>Section of Line</th>
    > <th>Opened</th>
    > <th>Closed</th>
    > <th>Notes</th>
    > </tr>
    > <tr>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > </tr>
    > <tr>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > <td>&nbsp;</td>
    > </tr>
    > </table>
    >
    > </body>
    >
    > </html>
    >
    > And here is the start of a style sheet:
    >
    > body {
    > background-color: rgb(223,174,45);
    >
    > }
    >
    > table {
    > font-family: arial;
    > font-size: 12.5px;
    > background-color: rgb(248,239,182);
    > empty-cells: show;
    > width: 900px;
    >
    > }
    >
    > What I want to know is this: how can I apply particular attributes to
    > columns rather than rows, or can't I, or is there a next best fix?
    >
    > Brian.


    I currently attempting the project you are talking about--almost but
    not as many tables.

    I found after several attempts at finding a stop gap solution and re-
    building existing pages that I was still not happy with the results,
    so I have started all over again, and I am using div with an external
    style sheet. I am finally well pleased with the results. After the
    style sheet is set up, it really is easy to create new pages using a
    basic template page and just adding data then saving each page to its
    existing counterpart. Make sure your blank template is set up
    correctly and W3C validate it both for html/xhtml and CSS, and then
    the conversion should go really smooth. One plus is you can change
    the look of all the pages at once through the style sheet.

    You can see what I have done so far, and the failed attempts, on my
    site http://a-ok-site.com.

    Later,

    Daniel
    a-ok-site, Nov 20, 2007
    #4
  5. Brian Robertson

    dorayme Guest

    In article <Ihq0j.80$>,
    Brian Robertson <brian@[nospam].com> wrote:

    > dorayme wrote:


    > >> What I want to know is this: how can I apply particular attributes to
    > >> columns rather than rows, or can't I, or is there a next best fix?

    > >
    > >
    > > You might have to study col and colgroup:
    > >
    > > http://www.htmldog.com/guides/htmladvanced/tables/
    > >
    > > Or if you want low tech, it is really simple, you simply class
    > > all the cells in each col and say what colour background you want
    > > in each cell:
    > >
    > > http://netweaver.com.au/alt/robertson.html
    > >

    >
    > Hiya. Thanks for that. Pretty much what I suspected. Just wanted
    > confirmation really. It is going to be a hard slog, but I am a total
    > convert to CSS and think it will be worth the effort.


    Well, there is nothing hard about the low tech solution as in
    last url. And with a good text editor (if you are really keen on
    css etc, leave your FrontPage alone for a while). In a good text
    editor with Search and Replace functions, low tech solutions
    become very easy to implement because you can very easily have
    such text as class="" inserted pretty well automatically over a
    set of things, even a whole page or a number of pages. But I
    won't go into this unless you are keen...

    If you want a lower than lower tech solution to inserting class,
    just set up at least the <td class=""> text to repeat line after
    line and fill in the class name by paste as appropriate.

    I should have said about col and colgrup that it might not be as
    reliable a method as what I call the low tech solution. Browser
    support might be a problem for the more elegant ways of colgroup.
    Test for yourself. Do feedback if you discover it is ok! I just
    use the low tech so I never investigated properly, I heard
    rumours about it though!

    Best of luck.

    >
    > The inline style info is there thanks to FrontPage and will be removed.
    > Thanks for reminding me though.
    >
    > Brian.


    --
    dorayme
    dorayme, Nov 20, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. helpful sql
    Replies:
    0
    Views:
    795
    helpful sql
    May 19, 2005
  2. Replies:
    5
    Views:
    577
  3. Replies:
    4
    Views:
    925
  4. =?Utf-8?B?YmVub2l0?=

    Read CSV - string Columns - Int columns

    =?Utf-8?B?YmVub2l0?=, May 8, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    =?Utf-8?B?YmVub2l0?=
    May 8, 2006
  5. Jacksm
    Replies:
    2
    Views:
    838
    Paul Chalekian
    Nov 21, 2006
Loading...

Share This Page