3 ms·
Two lines div { display: grid; place-items: center; }
by yurishimo 6y ago
Two lines
div {
display: grid;
place-items: center;
}
- runawaybottle 6y agoAlmost there. CSS spec people if you mingle with the common folk, take a look. Let’s get this down to 1 line.
- Aardwolf 6y agoI mean, 2 could be fine, if it is one for vertical and one for horizontal...
- Aardwolf 6y agoSeems to require also adding text-align: center to work on multiline text to get center-justified text