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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFRAME as footer section

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

Have two main divs .heading,. top="0", and .middle, top="130".

The footer content, ie 'Contact us' etc common to all pages is at the end of the .middle div.

For simplicity of maintenance would like to place the footer content in an IFRAME which would be positioned immediately after .middle div.

What code is required for this please?

TIA

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 
As long as your .middle is a div which is in the normal flow of the document (not floated or absolutely positioned), just create another div, say .footer and place it below .middle and put the iframe in there. If middle uses absolute positioning, try rewriting the code. Without seeing more code, it is impossible to say.
 
Vragabond

Thanks for your response.

The code that follows is from the .css file.

Suspect it's flawed by the use of position: absolute in .middle div?

Code:
.header {
	position: absolute ;
	left: 0px;
	top: 0px;
	height: 132px;
	width: 100%;
	margin: 0x;
	padding: 0x;
	border: 0px solid black;
	background-color: #cdf9fc;
	z-index:-100;	
}
.middle {
	position: absolute;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #000000;	
	left: 0px;
	margin-left: 0px;
	margin-right: 90px;	
	top: 171px;
	width: 98%;
	padding:0px;
	padding-left: 10px;
	padding-right: 10px;
	border: 0px solid black;
	background-color: #ffffff;
	z-index:-100;
}


FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 
Yes. Absolute positioning takes elements out of the normal document flow, so there is no way with html to determine where they end up. Apart from changing the top: property for middle, I think your page should be much the same off with changing your positions from absolute to relative. Try it and let us know. If you must use absolute positioning however, I guess you will have to resort to javascript to determine the height of the .middle element.
 
Vragabond

Assume you have three .divs that you want to follow each other sequentially down a page.

.div1 has a fixed height at left="0", top="0", .div2 needs to follow and expand depending on content and .div3 needs to follow on .div2.

What would be the position:xxxxxx values for each of those .divs?

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 
I would definitely do all three of them relative. They are sequential elements and follow each other in a correct order. That would give best results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top