Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automatic height on layout

Posted on 2007-12-04
6
Medium Priority
?
448 Views
Last Modified: 2008-02-01
I have the following layout with iframes:

http://absolutemediaworks.com/clients/newmoversway/

Each content page (home, about us, local moves etc) has different height (short content - long content on each one).  How could I make the whole layout adjust to the height of the content so at the bottom you don't see all the blank space?

Regards,

Johan.
0
Comment
Question by:Charlesfx9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:Sinoj Sebastian
ID: 20403313
This may help you
http://www.diplok.com/1ppl/html/article093.html

"resizeIframe()" is the one that adjust the height of the IFrame
<script type="text/javascript">
function resizeIframe() {
 
	// Must launched on the body onload event handler for IE
	// Use document.documentElement if you are in Compat mode
	i = parent.document.getElementById(window.name)
	iHeight = document.body.scrollHeight
	i.style.height = iHeight + 5 + "px"
}
</script>

Open in new window

0
 

Author Comment

by:Charlesfx9
ID: 20403417
Thanks for the respond,

I've placed the script on the main index that holds everything and nothing happens, I've also placed the script on the content page and nothing happens neither
0
 
LVL 12

Accepted Solution

by:
Sinoj Sebastian earned 2000 total points
ID: 20403448
Have you looked at the link?
http://www.diplok.com/1ppl/html/article093.html
you need place that script in content page and call that funtion onload.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Charlesfx9
ID: 20403504
I have the script on the content page and I believe I'm calling the function correctly but nothing happens....this is the content page where you can view it's source:

http://absolutemediaworks.com/clients/newmoversway/images/comercial_moves.html

0
 
LVL 12

Expert Comment

by:Sinoj Sebastian
ID: 20403664
Hmmm....
I see that.
Now I know that your Iframe resize is working
You see large blank space because, it is from content page
http://absolutemediaworks.com/clients/newmoversway/images/comercial_moves.html

I'll check it soon.
0
 

Author Comment

by:Charlesfx9
ID: 20403704
you're right...there is some space within the page (lot of <br>) but I had to forcely do it so the content will be correctly.  Somehow I have to fix this first to see the automatic height working...

Do you happen to know how I could fix all those spaces? I could place a new question to reward you the points since it maybe consider a new question.....let me know please

0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question