Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Absolute DIV - Relatvie Footer issue

Status
Not open for further replies.

Clarkie001

IS-IT--Management
Aug 26, 2003
59
0
0
GB
Hi,

On one of my pages I have created 5 seperate DIVs and positioned them Absolute - Display: none. I am then using javascript to display the data contained therein seperately and in the same position (hence the need for the absolute positioning).

The issue I have, is when javascript sets the hidden DIVs Display:Inline, my footer does not adapt and move down the page, instead the detail within the Absolute DIV is written through it.

How do I make the Footer DIV react once the hidden DIVs are shown and move?

Thanks for your help in advance.

Clarkie
 
That's the way it is supposed to work. That's how absolute positioning works. If you do not want it to work that way, I suggest you get rid of absolute positioning. Why is it there anyway?

Since giving display: none; to an element does not take up any space, you could have all 5 divs stacked somewhere with normal static positioning. If 4 of them are hidden at any time, then only one will show up at the right place every time. And your footer will get pushed down depending on how much content is there in the currently shown div.

Besides, you're supposed to be setting the div's display to block. If it is inline elements you want, you should use span.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Vragabond,

Yes, thanks... I have just realised I don't need the absolute whilst using display:none... These were previously hidden DIVs, which was the root of the issue, but I hadn't realised it was resolved by using display: none.

Thanks for the detail online inline also.

Clarkie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top