Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,104 questions

40,777 answers

573 users

How to define the height of each row in grid with CSS

1 Answer

0 votes
<!DOCTYPE html> 
<html> 
    <head> 
        <style>
            .grid-container {
                display: grid;
                grid-gap: 10px;
                /* 3 columns */
                grid-template-columns: auto auto auto; 
                /* define the height of each row */
                grid-template-rows: 95px 350px auto;
                background-color: blue;
                padding: 10px;
            }
            .grid-container > div {
                background-color: lightblue;
                border: 1px solid;
                padding: 15px;
            }
        </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 class="grid-item">D</div>
            <div class="grid-item">E</div>
            <div class="grid-item">F</div> 
            <div class="grid-item">G</div>
            <div class="grid-item">H</div>
        </div>
    </body> 
</html>

 





answered Jun 4, 2019 by avibootz

Related questions

1 answer 103 views
103 views asked Jun 3, 2019 by avibootz
1 answer 108 views
1 answer 98 views
3 answers 155 views
...