Reputation:
What would be the best approach to splitting the page into five columns like so in Angular?
Thank you and will be sure to accept the answer
Upvotes: 0
Views: 78
Reputation: 93363
Since you question is tagged react-jsx, the best approach is to use ready-for-use layout components ,like :
react-bootstrap
:
import {Col} from 'react-boostrap';
//...
render() {
// ....
<div className="raw" >
<Col md={6} mdPull={6} >
</Col>
<Col md={6} mdPush={6} />
</Col>
</div>
//
}
Upvotes: 1
Reputation: 1419
The fact that you're using React doesn't matter, this is a CSS problem. There is probably a few ways to solve this, but you can do something like this:
HTML:
<div class='container'>
<div class='left'>left</div>
<div class='right'>right</div>
</div>
CSS:
.container {
position: relative;
}
.right {
width: 185px;
position: absolute;
top: 0;
right: 0;
border: 1px solid red;
}
.left {
margin-right: 185px;
border: 1px solid blue;
}
http://codepen.io/anon/pen/RGzbor
Upvotes: 2