...

View Full Version : A better way to do this ..



kraftomatic
01-22-2004, 09:58 PM
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>

liorean
01-22-2004, 10:02 PM
That's a perfect example of what you should be using a table for.

kraftomatic
01-22-2004, 10:12 PM
Yes I know. :)

Mhtml
01-22-2004, 10:37 PM
*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. ;)

kraftomatic
01-22-2004, 10:59 PM
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?

liorean
01-22-2004, 11:19 PM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum