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

前端 未结 3 1620
被撕碎了的回忆
被撕碎了的回忆 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:40

    You make a 3 × 3 grid in HTML and CSS by writing a 3 × 3 HTML table and setting the dimensions of its cells in CSS. It is absurd not to use a table for a tic tac toe grid, which is a tabular structure if there ever was one.

    
    

    You normally don’t need id attributes here, as you can refer to cells by their structural position, both in CSS and JavaScript, unless you need to support ancient browsers.

    The details depend on the detailed requirements. Now the question says “not have any borders”, yet the CSS code clearly sets borders.

提交回复
热议问题