Baseball scorekeeping with a DIY Baseball Scorecard in html. See 'Create a Baseball Scorecard in Blogger' to set up your own scorecard blog. Scoring games with an on-line scoring form as part of the process of baseball writing (http://baseball---blog.blogspot.ca/).

Wednesday, April 20, 2011

CSS Position at-bat Box - another milestone


Yesterday's milestone, the Minima Blogger Baseball Scorecard, sucks compared with today's milestone.

Below is a new AB box that is made with CSS position elements; the diamonds are where they are because of top and left absolute position elements with-in a relative parent element - rather than a series of boxes that are packed together so none of them move - as in the 'Minima' scorecard I finished yesterday. Yesterday I scored the New York Yankees at Toronto Blue Jays game with the Minima scorecard and I had a great deal of difficulty keeping up, every time I changed the position of the cursor in the graph, the blogger-create-interface would pause for about 2 or 3 seconds as the spider finished crawling the 604 KB file. I guess that might have something to do with my processor speed.


This is how CSS really shines - the code for this is only 64 four lines long as opposed to the Minima scorecard's AB box which took 130 lines to create - that's 66 lines saved X 162 AB boxes in a two team scorecard = 10,692 lines of code!


BBFS
BX










CS




#9 1,2
BH7
#9 2,3



That's good because before I erased all the spacing tabs that make code easier to read, the Minima was at 1.15 MB and Blogger's per-page limit is 1MB - trimming all the indent tabs saved about 300,000 bytes! Like in the Shampoo commercial - wash rinse, repeat - coding is a lot of cut and paste and repeat, and repeat and repeat. I was astonished the other day when I looked at the size of the Minima scorecard; a million bytes?!? How did I create a million keystrokes?




mh

No comments:

Post a Comment

StatCounter


View My Stats

Calling for a Public Inquiry into Policing at the G20 Summit.

Creative Commons License Blogger Baseball Scorecard Blog by Michael Holloway
is licensed under a Creative Commons Attribution 2.5 Canada License.
Permissions beyond the scope of this license may be available at michaelholloway111(at)gmail(dot)com