How do I make a grid with Html and CSS with DIVS

前端 未结 3 1599
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 01:03

I have all my divs necessary for my tic tac toe game, however I can\'t seem to find a simpler way to make a grid and not have any borders so it\'s just a grid and not 9 full

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 01:44

    Like @NoobEditor said in his comment: show us what you've tried so far next time.

    You can achieve this by using divs floated next to each other, acting as columns. Inside those divs you add more divs acting as rows.

    CSS

    .column{
       float: left;
       width: 70px;
       height: 70px;
       border: 1px solid blue;
       overflow: hidden;
    }
    
    .row{
        width: 68px;
        height: 25px;
        border: 1px solid red;
    }
    

    Example here.

提交回复
热议问题