Lunarpages Internet Solutions Blog
  • Home
  • About Us
  • LunarForums
  • Free Web Tools
  • Free WP Themes
0

Look ma…..no frames!

22 October, 2006 - Design, Todd Austin

Author: Todd Austin

I whipped this up in response to a post on a clients forum. They wanted to know how to get a frames page look without using frames. I suggested a css solution. See page here.

**This may be old to some readers, and I realize that. But some newbies may find it useful**

The html is just three divs: header, content and footer. Here’s a quick look at the css for the header and footer:

#header {
background-color:#000000;
color:#ffffff;
top:0;
position:fixed;
height:80px;
width:100%;
}

#footer {
background-color:#000000;
color:#ffffff;
bottom: 0;
position: fixed;
height:80px;
width:100%;
overflow: hidden;
z-index: 100;
}

We use position:fixed so that both the footer and header remain in place as the page is scrolled and to keep the position relative to the browser window no matter what positioning the parent element has. Using the offset properties top and bottom, we tell the browser specifically where to position these elements. Using top and bottom on the #content element, we imply a height for the element.

#content {
padding:0;
margin: 0;
top:80px;
bottom:80px;
position:fixed;
width:100%;
overflow:auto;
}

Then if you like, you could use a server side include (SSI) for the content, as I have done here: http://designreverb.com/test_noFrames.php Here I have the same header, content and footer divs. The content is being called from another page: some_content.shtml. (The page could just have easily been .htm, .php, .html …etc. )

content

This works great, but you’re ‘test_noFrames’ page will have to be a .php file (test_noFrames.php instead of test_noFrames.htm) like this: http://designreverb.com/test_noFrames.php and http://designreverb.com/some_content.shtml (these url’s are live so check them out)

NOTE: This has only been tested in IE7 and Firefox 2.0. :)

Questions? Comments? Lemme know.

Archives

Categories

View more:

  • About the Lunarpages blog
  • Best Blog Hosting Guide
  • BOTW.org 40% Discount
  • Contact Lunarpages
  • Free Online Tools
  • Free Webmaster Downloads
  • Free Wordpress Themes

Best Web Hosting

Lunarpages.com Web Hosting

Recent Posts

  • Customer Showcase – SportVision
  • 5 Mobile App Trends for 2012
  • 10 Technology Trends for 2012
  • 5 Open Source CMS for Websites
  • Google Will Change Your Web Marketing in 2012

Recent Comments

  • Anonymous on 10 Best Google AdSense WordPress Plugins
  • best seo forums on 5 Reasons Why VPS Hosting May Be the Solution You’ve Been Searching For
  • Roger on 5 Mobile App Trends for 2012
  • Web Hosting Reviews on 2012 Resolutions Promotion
  • Graham Gillen on Plesk 9.5.2 Backup Tutorial

@Lunarpages Feed

Who We Are

  • Web Hosting Services
  • About us
  • Partners
  • Affiliate Program
  • Specials
  • 24/7/365 Support Desk
  • Community Forum
  • WIKI

Our Products

  • Colocation Services
  • Fully Managed Services
  • Dedicated Hosting
  • VPS Hosting
  • Microsoft Exchange
  • Open-Xchange
  • Fax To Email
  • Linux Hosting
  • Windows Hosting
  • Reseller Hosting
  • Quicksite Website Builder
  • SEO & SEM Services
  • Payment Processing
  • SecureLive Website Security
  • Tremendesk - Help Desk Solution

Connect With Us

Stay in touch with us!

Sign up for our monthly newsletter to receive updates, news, and current promotions!

Twitter
Facebook Google+ RSS Feed


© 2000 - 2011 Add2Net, Inc. "Lunarpages", "Add2Net" and the "Lunar Symbol" are the trademarks or the Registered trademarks of Add2Net, Inc.
All rights reserved. Unauthorized use is prohibited.