We compute the Hausdorff dimension of limit sets generated by 3-dimensional self-affine mappings with diagonal matrices of the form A_{ijk}=Diag(a_{ijk}, b_{ij}, c_{i}), where 0<a_{ijk}le b_{ij}le c_i<1. By doing so we show that the variational principle for the dimension holds for this class.