Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

css 2 components side by side react

//Suppose this the js file: Use a div (in this case its rowC) to make a row 
--
import Coursebox from './Coursebox';
import Newsbox  from './Newsbox'
 class ContainerRow extends React.Component {
 render(){
    return (
        <div className='rowC'>
            <Coursebox />
            <Newsbox />
        </div>
    );
 }
}

//Using CSS you can put the two components side-by-side: 
.rowC{display:flex; flex-direction:row;}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #css #components #side #side #react
ADD COMMENT
Topic
Name
4+3 =