-3

How can I make my page split into 2 separate "columns" both of them being scrollable?

<table width=100% height=100%>
   <tr>
       <td width=50%><a style='margin-top:130%'></a>
      </td>
       <td width=50%>Put page2 here
      </td>
   </tr>
 </table>
VladJ
  • 107
  • 2
  • 10

2 Answers2

0

Instead of using tables for layout purposes, please use CSS. It is really not a good idea to use tables for layout purposes. Here's an easy version for you.

.left, .right {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 50%;
  background: #ccf;
  overflow: auto;
}
.right {
  left: 50%;
  right: 0;
  background: #cfc;
}
<div class="left">
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
</div>
<div class="right">
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
  Pages you view in incognito tabs won’t stick around in your browser’s history, cookie store, or search history after you’ve closed all of your incognito tabs. Any files you download or bookmarks you create will be kept.<br />
  However, you aren’t invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit.<br />
</div>
Community
  • 1
  • 1
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
0

You can do this using float or absolute positioning. Below is a solution using floating.

I added overflow:scroll to demonstrate the scrollbars.

html, body, div {
    height: 100%;
    margin: 0;
}
div {
    width: 50%;
    float: left;
    overflow: scroll;
}
<div></div>
<div></div>
Midas
  • 7,012
  • 5
  • 34
  • 52