Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> grid-container { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 60px; grid-gap: 20px; } grid-item { display: grid; align-items: center; justify-items: center; } grid-container { background-color: #fff; border: 1px solid #666; padding: 20px; } grid-item { background-color: #dce0dd; border: 1px solid #666; } </style> </head> <body> <grid-container> <grid-item>A centered text</grid-item> <grid-item>A centered text</grid-item> <grid-item><img src="http://i.imgur.com/60PVLis.png" width="40" height="40" alt="text"></grid-item> <grid-item><img src="http://i.imgur.com/60PVLis.png" width="40" height="40" alt="text"></grid-item> </grid-container> </body> </html>