How to create grid with 1 row and 3 cols in CSS

1 Answer

0 votes
<!DOCTYPE html> 
<html> 
    <head> 
        <style>
            .grid-container {
                display: grid;
                grid-template-columns: auto auto auto;
            }
            .grid-item {
                border: 1px solid;
                padding: 10px;
                text-align: center;
            }
        </style>
    </head> 
    <body> 
       <div class="grid-container">
            <div class="grid-item">A</div>
            <div class="grid-item">B</div>
            <div class="grid-item">C</div>  
        </div>
    </body> 
</html> 

 



answered May 20, 2019 by avibootz

Related questions

3 answers 339 views
1 answer 305 views
305 views asked Jun 3, 2019 by avibootz
1 answer 227 views
227 views asked May 20, 2019 by avibootz
1 answer 258 views
2 answers 303 views
1 answer 318 views
...