Are <ol></ol> and <div></div> classified when dividing columns by grid?

Asked 2 years ago, Updated 2 years ago, 121 views

I don't know if you understand the question.

Middleview to grid value

Are ol and div treated at the same level (?)?



 <!DOCTYPE html>
<meta charset="utf-8">
<style>
    body{
        margin: 0px;
    }
    #topview{
        background-color: #20ACE4;
        display: grid;
    }
    .logoimg{
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
    }



    #middleview{
        display:grid;
        grid-template-columns: 150px 1fr;
    }

</style>

<html>




<head>
<title>Entrustech</title>
</head>


<body>
<div id="topview"> 
        <div>
            <img src="%EC%97%94%ED%8A%B8%EB%9F%AC%EC%8A%A4%ED%85%8D%20%EB%A1%9C%EA%B3%A0.png" class="logoimg">
        </div>
</div>


<div id="middleview">


<ol id="index">
  <li><a href="main.html">main</a></li>
  <li><a href="address.html">address</a></li>
  <li><a href="portfoli.html">portfoli</a></li>
</ol>


 <div>
    <h1>EntrusTech</h1>

<p>
    Entrustec is a hardware/embedded SI company. The areas of business are as follows:
</p>

<ul>
  <li>Circuit Design</li>
  <li>PCB Design</li>
  <li>Firmware</li>
    <li>Software</li>
    <li>Sample Manufacturing</li>
</ul>        

    <p style="margin-top:45px;">
        Experienced freelancers with long experience are optimized work processes<br>
        It gives you satisfactory results at a reasonable cost. 
    </p>
 </div>


</div>
</body>
</html>

html5 css3

2022-09-22 18:13

1 Answers

There are two ol and div under div#middleview, and ol and div are both default display property values. Therefore, both will be affected by the grid-template-columns property definition of the parent object as grid item of the same type. In that sense, it's class-level treatment.


2022-09-22 18:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.