DEV Community

Discussion on: CSS Battle #2 - Carrom

Collapse
 
yashptel profile image
Yash Patel • Edited

best I can think of. 166 char.

<p><p><p><p> <style> body { display: grid; grid-template: "p p"; background: #62374e} p { margin: 42px 158px 58px 42px; width: 50px; height: 50px; background: #fdc57b
Enter fullscreen mode Exit fullscreen mode

or 147 char if space removed

<p><p><p><p><style>body{display:grid;grid-template:"p p";background:#62374e}p{margin:42px 158px 58px 42px;width:50px;height:50px;background:#fdc57b
Enter fullscreen mode Exit fullscreen mode
Collapse
 
tarishahmed profile image
Tarish Ahmed • Edited

remove px as it is the default unit for these properties.

Collapse
 
sssshut_up profile image
Naseer Hussain • Edited

138 Chars

body{display:grid;grid-template:&quot;p p&quot;;background:#62374e}p{ margin:42px 158px 58px 42px;padding:25px;background:#fdc57b</p>

Collapse
 
bohemme profile image
Bohemme • Edited

Just a few less characters (143) and other approach, but I can't think of anything more to remove, but the best results are half that number. :O

<p><p b><p a><p a b><style>*{background:#62374e;padding:21}p{background:#fdc57b;width:8;height:8;position:fixed;top:34}[a]{top:184}[b]{right:50

Collapse
 
ankitecd profile image
Ankit Gupta

Tried same method as 1st one and got done in 129 chars
<i style=color:#fdc57b;box-shadow:.7in+.7in+0+.26in,3.3in+.7in+0+.26in,.7in+2.26in+0+.26in,3.3in+2.26in+0+.26in,0+0+0+5in#62374e>

Collapse
 
carlverret profile image
Carl Verret • Edited

this is actually a 135 caracters answer !
<p><p><p><p><style>body{display:grid;grid-template:"p p";background:#62374e}p{margin:42 158 58 42;width:50;height:50;background:#fdc57b