Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts

    A better way to do this ..

    Hey Guys,

    I have a listing here, which looks good. Although, I think there's a better/cleaner way I can do the same thing with less code. Maybe it's just the <br> tags after each line that bother me. In any case, I wanted to get a second opinion.

    As always, any suggestions are appreciated:

    Thanks.


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>
    <head>
    <title>Untitled</title>
    </head>

    <body>

    <style type="text/css">

    body {
    background: #fff url(bg.gif) no-repeat fixed top left;
    font-family: verdana, helvetica, arial, sans-serif;
    margin: 0;
    color: #333;
    }

    .schedules {
    margin: 0;
    width: 508px;
    text-align: left;
    font-size: 11px;
    line-height: 18px;
    border:1px solid #ffcc00;
    }

    .schedules.leftside {
    width: 60px;
    text-align: left;
    /*border: 1px solid #000;*/
    }

    .schedules.middle {
    width: 290px;
    text-align: center;
    /*border: 1px solid #ccc;*/
    }

    .schedules.rightside {
    width: 150px;
    text-align: left;
    /*border: 1px solid #fae453;*/
    }

    </style>


    <div class="schedules">
    <span class="leftside">
    03/26-28<br>
    05/07-09<br>
    05/20-23<br>
    06/11-13<br>
    07/16-18<br>
    07/30-8/1<br>
    08/20-22<br>
    09/10-12<br>
    09/24-26<br>
    10/13-17<br>
    </span>
    <span class="middle">
    North Florida Motorsports Park<br>
    Las Vegas Motor Speedway<br>
    2004 Cycle Jam, Virginia International<br>
    California Speedway<br>
    Grattan Raceway<br>
    Summit Point Raceway<br>
    Talladega Gran Prix Raceway<br>
    Nelson Ledges Road Course<br>
    Barber Motorsports Park<br>
    Grand National/Suzuki Cup Finals<br>
    </span>
    <span class="rightside">
    Jennings, Florida<br>
    Las Vegas, Nevada<br>
    Alton, Virginia<br>
    Fontana, California<br>
    Grattan, Michigan<br>
    Summit Point, W. Virginia<br>
    Talladega, Alabana<br>
    Garrettsville, Ohio<br>
    Leeds, Alabama<br>
    Braselton, Georgia<br>
    </span>
    </div>

    </body>
    </html>

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    That's a perfect example of what you should be using a table for.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Yes I know.

  • #4
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    *sigh* ... You are in violation of our posting quidelines! I made a sticky about this called "Read this first" or something, you can't miss it. There is also the link next to the subject field when posting a new post and of course that link up in the top right marked "Posting Guidelines: Read this before you post" with a nice yellow exclaimation mark warning sign thingy..

    [edit:] Kraftomatic, you have over 140 posts!! I'd expect much better from a senior member.
    Omnis mico antequam dominus Spookster!

  • #5
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts
    I have read it. What did I do wrong?

    I know this can be done with tables. I'm looking for input on how it can be done better compared to what I have (specifically removing br tags after each line).

    Am I still in the wrong?

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You misunderstood what I said - I meant that this is something you SHOULD use a table for, semantically a table is the right thing to use, since this is to a very high degree tabular data. Possibly a list, but a table is even more correct. So, why use your hackup of a tabular presentation for something that really should have been a table from the start?
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •