Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Two Columns">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  
  <div id="content">
    <p>Main content in here</p>
  </div> 
  <div id="sidebar">
    <p>I’m the Sidebar!</p>
  </div>
</body>
</html>
 
#content {
  border: solid 4px black;
  width: 100%; 
  margin-right:-200px;
}
/* Prevent text from being overlapped */
  #content p {
    margin-right: 210px;
    border: solid 1px blue;  
  }
/* It’s 200px + 10px, the 10px being an additional margin.*/
#sidebar {
  border: solid 1px black;
  width: 200px; 
}
div {
  box-sizing: border-box;
  float: left;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
dmitrizpro
0viewers