April 12, 2004

The box model

  • In at 21:00
  • Got a reply. He included some links to info on this stuff:
  • He gave me an example that works, but with hard-coded widths. One trick is to have a "cleaner" div to clear out some of the settings used in for those lists, and to bracket the floaters
  • Responding to the reply. The code he gave works in everything I have on this machine. But he said that cell-padding doesn't work in IE 5.x.
  • Reading articles on box model he pointed me at
  • Sheesh. What a pain. Who knew this one layout idea would be so difficult.
  • Need to put his test up on the server so I can test it with IE5.x on my other machines. (Gawd, Microsoft sucks. Integrating the browser into the OS is such a huge architectural mistake.)
  • Playing with floater ideas
    • I just tried doing 50% and -1 margins left and right. It worked everywhere except Netscape 4.x. It drew the the lists on top of each other.
    • I commented out the -1 margins and then NS4.8 came really close. It put the lists next to each other, but the holder put a border around only the left one.
    • Next, I commented out the border around the holder. Now, the two floater boxes are no longer 50-50. The right is squished down to a coupla dozen pixels.
    • Oh, and this glitch almost slipped by me. IE6 drew it correctly initially. But switching to another window and back, it lost parts of the border. Just a chunk out of the middle of the two sides, not the entire edge. Very odd.

    Darn. So close.

    I think the box model is missing one piece.

    It's too bad this likely-kinda-common situation wasn't addressed, somehow. I can see those borders causing constant headaches. The problem is, it's one of those 50-50 situations. Sometimes you'd want to specify the outer extents of the box, including border and margins. Other times, you'd want to specify the internal dimensions of the box, and the margin and borders just fall where they may.

    If it were me, I would have provided a method to tell the renderer what to include within the box extents. I can see situations where I would want to define the edge of the box to include the padding, the border, or the margins.

  • Positioned copyright symbol correctly in footer
  • Having trouble concentrating. Out at 04:30
Posted by Mighty at April 12, 2004 04:21 AM