Seattle Web Design
Seattle Web Design
Feed Burner Subscribe Via Feed
Subscribe Via Email:

Contact Aldebaran Website Design Seattle

Meet the author:
Jill Olkoski

Jill has a MA in Clinical Psychology, a BS in Computer Science, and a BS in Mechanical Engineering.

She currently owns Aldebaran Web Design in Seattle WA and enjoys educating her clients on topics related to small business website design.

In Jill's previous life, she spent 17 years in the engineering and quality organizations of a Fortune 100 tech company.

Please enjoy the articles and leave a comment!

Powered by FeedBurner


How to position a page within an iframe

October 19th, 2009

An iframe, is an HTML element that gives you a window through which you can view another website. But sometimes, you want to show just a particular piece of that other website. I thought this was  impossible to do, until today, when I found an article that told me how to do it.

This tidbit of information is so valuable, that I want to capture it here so that if the other person removes it, I’ll still have it. The article was found on the Cyberstarweb.com website, and is entitled: “How to position a page within an iframe using CSS“. Just a brilliant solution that uses an outerdiv (that controls the size of the iframe) and an inner div (that controls the positioning on the framed page):

#outerdiv
{
width:446px;
height:246px;
overflow:hidden;
position:relative;
}

#inneriframe
{
position:absolute;
top:-412px;
left:-318px;
width:1280px;
height:1200px;
}
<div id=’outerdiv’>
<iframe src=”http://www.websitethatisinsideframe.com/” id=’inneriframe’ scrolling=no></iframe>
</div>

Jill
--------------
J. Olkoski
Aldebaran Web Design, Seattle
Jill Olkoski has a BS in Engineering, a BS in Computer Science and an MA in Clinical Psychology. She delights in using her advanced technical, psychological and interpersonal skills to help small business owners develop cost-effective and successful websites.
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Human Moderation Enforced

5 Responses to “How to position a page within an iframe”

  1. Valerie Says:

    Hi Jill, does this solution work on an iPhone? I recently discovered a page I designed using an iframe doesn’t load on the iphone so I’m feeling cautious about using iframes. BTW, love your blog.

  2. Jill Olkoski Says:

    Hi Valerie,
    That’s a great question. The client I found this solution for ended up not using the iframe, so I can’t check it out (I do have an iPhone). In general, I never use iFrames when designing websites. In this case, the code was viewing a subscription system on another URL, so there was no way around it, no other way to embed it.

  3. Elisa v Says:

    Thanks for saving this tip on your website.
    Actually, it seems that the original article was deleted like you thought it will be…
    Thanks again, have a nice day ! (you saved mine)

  4. Jill Olkoski Says:

    Holy cow…I can’t believe it was deleted…well, I’ll be very, very sure to always duplicate any code help in the future – and glad it helped. It totally saved my day too!

  5. dvector Says:

    same here! glad you kept a copy and thank you for sharing

Please Leave A Comment or Question:

(I'll respond to all questions by posting a reply as well as emailing you.)




Aldebaran Web Design, Seattle WA
Jill@AldebaranWebDesign.com

[Home]  [New Website Design]  [Website Redesign]  [Search Engine Optimization]  [Content Management]  [Maintenance]  [eCommerce ]  [Website Portfolio]  [Testimonials]  [Contact ]

 ©2010 Aldebaran Website Design, Seattle WA
 All Rights Reserved
Small Business Website Design
by Aldebaran Website Design, Seattle WA
Site Last Modified: June 26, 2010
Search Articles:
My fabulous website Hosting Company: dreamhost website hosting

My favorite website Traffic Tracking Tool: Web-Stat hit counters
dreamhost website hosting  Web-Stat hit counters  Green Power Partnership    Green Web Hosting! This site hosted by DreamHost.  
Thanks for Voting us one of the best web designers in the Best of Seattle Website Design CategoryVoted One Of The Best Seattle Website Design Companies