user6898719
user6898719

Reputation:

Angular: What is the best approach to make five columns?

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

Answers (2)

Abdennour TOUMI
Abdennour TOUMI

Reputation: 93363

Since you question is tagged , 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>
    //
    }

REF

Upvotes: 1

neurotik
neurotik

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

Related Questions