Table data vertical alignment malfunctions in firefox

Discussion in 'CSS' started by istioploos, Mar 22, 2007.

  1. #1
    I use tables to tabulate data as shown in this link http://www.istioploos.gr/AgonesCalendar.htm
    Everything looks fine in IE, but in firefox the year on the left cell is higher than the data on the right cell although the vertical alignment is set to “top”. Any ideas how to fix this in firefox?
     
    istioploos, Mar 22, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Firefox is displaying correctly. IE is improperly collapsing the p's margin with the cell margin. The cell, td, has no margin property to collapse with. IE just screws up.

    To get what you apparently want, change .style21 to
    
    .style21 {
      margin: 0;
      }
    Code (markup):
    This will eliminate the need for the negative bottom margin, too.

    I have mentioned this to you before; if you use FrontPage and test in IE, you will have crap for code. The proper questions are, how is the code messed up and why is IE screwing up.

    cheers,

    gary
     
    kk5st, Mar 22, 2007 IP