Log in

View Full Version : alternative to iframe in css?



dani-wu
12-22-2008, 05:30 PM
Here is my site so far:
http://www.kisssmileandskincare.ca/new/

It's fine on Firefox but the content in the frame doesn't show up on Internet Explorer.

I know people hate iframes. Is there a css workaround (so that I can still have scrolling content within a contained area)?

Thanks in advance!!!

Some other links:
http://www.kisssmileandskincare.ca/new/A_home.htm
http://www.kisssmileandskincare.ca/new/style.css
http://www.kisssmileandskincare.ca/new/iframe.css

bluewalrus
12-23-2008, 01:39 AM
Make a div. Set a height and width with overflow set to auto for that div. Put content you had in iframe in that div.

ie(example yay)
CSS


#thiswasmyiframenowiusecssYAY {
height:100px;
width100px;
overflow:auto;
}

HTML


<div id="thiswasmyiframenowiusecssYAY">
<p>
YADAYADAYADAYADAYA DAYADAYADAYADAYADAYADAYADAYADAYADAYADAYADA
I want an image <img src="myimagewahooo.jpg" style="float:left;" /> there's my image
well well well i wonder if this is 101 pixel yet to show the scroll bar if its not but you
always want the scroll bar there change the overflow to scroll</p></div>


For more info http://www.456bereastreet.com/lab/cssframes/