0

I have two blogs. I need to link those.

'one.html' of the 'website1.com' should load the 'website2.com'.

The address 'website2.com' should not be displayed, instead, it should show 'website1.com/one.html'.

It has to scroll without cutting the content (auto adjust height, based on the content/no. of posts) but scroll bar should not be visible.

I created an iframe and was able to hide the scroll bar as well, but it did not auto adjust the height. Either it does not show full content or shows half content.

Please provide the appropriate HTML, CSS, and/or Javascript code to do the same.

Thanks in advance.

Harshil Shah
  • 203
  • 1
  • 16
Cody Coderson
  • 411
  • 1
  • 9
  • 21
  • 3
    Please provide the appropriate HTML, CSS and/or Javascript code you tried so we can check why you have errors. – Shilly Dec 29 '16 at 11:12
  • Possible duplicate of [make iframe height dynamic based on content inside- JQUERY/Javascript](http://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquery-javascript) – Kilian Stinson Dec 29 '16 at 11:13
  • website2 will be the same that website1 ? – Steeve Pitis Dec 29 '16 at 11:15

1 Answers1

0
<style>
 #support-box {
        width: 50%;
        float: left;
        display: block;
        height: 20rem; /* is support box height you can change as per your requirement*/
        background-color:#000;
    }
    #wrapper {
        width: 90%;
        display: block;
        position: relative;
        top: 50%;
        transform: translateY(-50%);
         background:#ddd;
       margin:auto;
       height:100%; /* here the height values are automatic you can leave this if you can*/

    }
    #wrapper iframe {
        width: 100%;
        display: block;
        padding:10px;
        margin:auto;
    }
</style> 
<div id="content" >
    <div id="support-box">
        <div id="wrapper">
            <iframe name="frame" id="frame" src="website2.com" frameborder="0"></iframe>
        </div>
    </div>
  </div>

Demo : https://jsfiddle.net/umd2ahce/6/

Imran Mohammed
  • 168
  • 1
  • 10