Top margin breaks FixedHeader

Top margin breaks FixedHeader

peterkronenbergpeterkronenberg Posts: 112Questions: 0Answers: 0
edited November 2010 in General
Allan,
Setting a top margin on the table breaks the FixedHeader. It seems to be taking it into account twice, so the FixedHeader ends up lower than the table header by the amount of the margin. I tried this on your example at http://www.datatables.net/release-datatables/extras/FixedHeader/index.html and got the same results.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    How did you try this with my example? If I add something in like this "table.display { margin-top: 100px }" then the table itself doesn't have the margin applied to it like might be expected, due to the use of floats etc. The FixedHeader however does have it applied, since it's an absolutely positioned element.

    I'd suggest that in this case the easiest thing to do is to apply the margin spacing you want to a different element :-)

    Allan
  • peterkronenbergpeterkronenberg Posts: 112Questions: 0Answers: 0
    I tried it with your example by using Firebug. Firebug let's me dynamically change the styles that are applied.
This discussion has been closed.