square

Make a Square in CSS

make-a-square-in-css

To make a square in CSS set up your div and name is whatever you want to name it. We will give our div a name of square. [code]<div id="square"></div>[/code] Now all we do is style it in CSS. [code]<style>#square{width:100px; height:100px;}</style>[/code] You can also give it some background color. [code]<style>#square{width:100px; height:100px; background:red;}</style>[/code] Make a Square Read More