runeveryday — 2010-08-15T21:20:45-04:00 — #1
this is the HTML structure.
the table's height is changed.how to make the paragraph's location fixed?
runeveryday — 2010-08-16T09:31:47-04:00 — #2
you're right. but the content of the table are input by the admin. the div's height is fixed.the table's height is dynamic.is there a way to make the paragraph show at the same location on all the pages.
stevie_d — 2010-08-16T08:33:46-04:00 — #3
How do you know how much space the table will need? If someone has set a larger default font size, the table will take up more space than you're expecting, and so may overlap the paragraph below
donboe — 2010-08-15T21:44:23-04:00 — #4
Hope that helps
mpaulino — 2010-08-17T03:59:42-04:00 — #5
If you know the height of the paragraph, you can specify a padding either on top or bottom of the browser window.
<div id="nav" style="padding-bottom: 50px">
<p style="position:fixed; bottom: 0; height: 50px">...</p>
Position fixed is not like absolute, it will always follow the browser window regardless of its parent element's position value. If you don't want to specify a height, then you adjust the bottom padding until the paragraph doesn't overlap with anything anymore.
stevie_d — 2010-08-16T11:51:18-04:00 — #6
As donboe said, you can use position:fixed and set top/bottom and left/right.
That still doesn't resolve your problem of having a dynamic height table above a fixed position element, unless the div is big enough to cater for the maximum text that will ever be entered in the table, in the maximum font size.