anchor.diff:              break;
           Dec(I);
         end;
  -      Tag := OwnerCell.OwnersTag;
  +      if OwnerCell.OwnerBlock <> nil then
  +        Tag := OwnerCell.OwnerBlock.Symbol
  +      else
  +        Tag := OtherChar;
         if I < 0 then
         begin {no previous non absolute block, remove any Auto paragraph space}
  -        if TopAuto then
  -        begin
  -          if (Tag = 'li') then
  -          begin
  +        case Tag of
  +          BodySy:
  +            MargArray[MarginTop] := Max(0, MargArray[MarginTop] - OwnerBlock.MargArray[MarginTop]);
  +        else
  +          if TopAuto then
               MargArray[MarginTop] := 0;
  -          end
  -          else
  -            MargArray[MarginTop] := 0;
  -        end
  -        else if (Tag = 'default') or (Tag = 'body') then
  -          MargArray[MarginTop] := Max(0, MargArray[MarginTop] - OwnerBlock.MargArray[MarginTop]);
  +        end;
         end
         else
         begin
  -        TB := OwnerCell[I];
  -        if ((TB is TTableBlock) or (TB is TTableAndCaptionBlock)) and
  -          (TBlock(TB).FloatLR in [ALeft, ARight])
  -          and TopAuto then
  +        if ((TB is TTableBlock) or (TB is TTableAndCaptionBlock)) and (TBlock(TB).FloatLR in [ALeft, ARight]) and TopAuto then
             MargArray[MarginTop] := 0
           else if (TB is TBlock) then
           begin
             LastMargin := TBlock(TB).MargArray[MarginBottom];
             TBlock(TB).MargArray[MarginBottom] := 0;
  -          if LastMargin >= 0 then {figure out how many are negative}
  -            if MargArray[MarginTop] >= 0 then
  -              Negs := 0
  -            else
  -              Negs := 1
  -          else if MargArray[MarginTop] >= 0 then
  -            Negs := 1
  -          else
  -            Negs := 2;
  +          Negs := 0;
  +          if LastMargin < 0 then {figure out how many are negative}
  +            Inc(Negs);
  +          if MargArray[MarginTop] < 0 then
  +            Inc(Negs);
             case Negs of
               0: MargArray[MarginTop] := Max(MargArray[MarginTop], LastMargin);
  -            1: MargArray[MarginTop] := MargArray[MarginTop] + LastMargin;
  +            1: MargArray[MarginTop] :=     MargArray[MarginTop] + LastMargin;
               2: MargArray[MarginTop] := Min(MargArray[MarginTop], LastMargin);
             end;
           end
  -        else if (Tag = 'li') and TopAuto
  -          and ((Pos('ul.', TagClass) = 1) or (Pos('ol.', TagClass) = 1)) then
  +        else if (Tag = LISy) and TopAuto and (Symbol in [ULSy, OLSy]) then
             MargArray[MarginTop] := 0; {removes space from nested lists}
         end;
       end;
  
positive.code:   inherited Create;
    FOwnerBlock := OwnerBlock;
    FDocument := MasterList;
    OwnersTag := T.OwnersTag;
    for I := 0 to T.Count - 1 do
    begin
      Tmp := T.Items[I];
  
negative.code:   CodeSite.AddSeparator;
    {$ENDIF}
    inherited Create(OwnerCell, Attributes, Prop);
    MyCell := TBlockCell.Create(Document, Self);
    DrawList := TList.Create;
  
    if Document.UseQuirksMode and (Self is TTableBlock) then
  