coffeebrandy
asked on
inserting html into html
I created a website in photoshop sliced it up and saved for web. I want this one page to be the stationary page for the whole site meaning it never gets refreshed or changed. Instead, I sliced a cutout in this page that I want all the current web content to be located in. So I basically want to edit 5 simple html files and have them pulled into the cutout on the main page.
I also would like my links on the main page to be able to call each of these 5 html files when clicked.
I've played a little with server side includes but also want this html within the cutout to scroll instead of stretching the main site out of wack when there's too much content in it.
Is there possibly a javascript answer to this?
I also would like my links on the main page to be able to call each of these 5 html files when clicked.
I've played a little with server side includes but also want this html within the cutout to scroll instead of stretching the main site out of wack when there's too much content in it.
Is there possibly a javascript answer to this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could use php / javascript to do this and fill up a div. "Just" use a small javascript to fill the content div, like in the code below, to replace the lorem ipsum text with the content matching the menu links. Because it has a overflow: auto, it will stay within the given height of the element and not 'mess up' your page.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<style>
.wrapper
{
width: 500px;
margin: 0 auto;
}
.content
{
width: 500px;
height: 200px;
float: left;
border: black 1px solid;
overflow: auto;
}
</style>
<body>
<div class="wrapper">
<div class="content">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has survived not only five
centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It
was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
passages, and more recently with desktop publishing software like Aldus PageMaker including
versions of Lorem Ipsum.<br />
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book. It has survived not only five
centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It
was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
passages, and more recently with desktop publishing software like Aldus PageMaker including
versions of Lorem Ipsum.<br />
</div>
</div>
</body>
</html>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Chris and Ms,
I went with Iframes and it was actually pretty easy. Now I just gotta get my links to call these frames.
I went with Iframes and it was actually pretty easy. Now I just gotta get my links to call these frames.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I chose iframes although I've read that frames are really not the way to go now days.
You can use frameset and call the links to update the content frame with your html pages
A simple example can be found here http://www.yourhtmlsource.
More info http://www.w3schools.com/h