/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2021 Nguyen Huu Phuoc */ import * as React from 'react'; import { Helmet } from 'react-helmet'; import { Link } from 'react-router-dom'; import RelatedPatterns from '../../components/RelatedPatterns'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import BrowserFrame from '../../placeholders/BrowserFrame'; const Details: React.FC<{}> = () => { return (
To center the content, you also can use other technique demonstrated in the Centering pattern.
...
`} css={` .avatar { /* Center the content */ display: inline-block; vertical-align: middle; /* Used to position the content */ position: relative; /* Colors */ background-color: rgba(0, 0, 0, .3); color: #FFF; /* Rounded border */ border-radius: 50%; height: 48px; width: 48px; } .avatar__letters { /* Center the content */ left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); } `} >
PN
); }; export default Details;