Friday, July 8, 2011

How to merge two html files and render as a one html

Hmmm it took a little while for me to google and find a good way of doing so.
I was fortunate enough to get to know about iframe tag in html.
But putting two iframes didn't satisfy my need. The two frames render on the left and right side of the final .html. But I wanted to show them downwords. A friend of mine suggested to use <div> and it worked.
But there was another issue. The two frames did not fit into the screen. for that i had to use style attribute.

So here's the final html code that did the trick.
The code explains itself what has happen, better than me saying it in words.


<div  >
<iframe src="http://www.google.lk/" scrolling="no" frameborder="0" style="width:100%; height:80%;"></iframe>
</div>
<div >
<iframe src="http://modernmerlins.blogspot.com/" scrolling="no" frameborder="0"  style="width:100%; height:250%;"></iframe>
</div>


put the above code in a .html (give any file name and let the file extension be .html ) file and open it up in a browser.... hurry do and see how cool it is. (figure 1)

Note: you can use any html file instead of the links given for src in the above code.

figure 1



1 comment:

  1. I was actually looking for this resource a few weeks back. Thanks for sharing with us your wisdom.This will absolutely going to help me in my projects .
    Once again great post. You seem to have a good understanding of these themes.When I entering your blog,I felt this . Come on and keep writting your blog will be more attractive. To Your Success!
    Classic Dresses
    Classic Bridesmaid Dresses
    Trumpet Wedding Dresses
    New Style Flower Girl Dresses
    Wedding Dresses with Sleeves

    ReplyDelete