Skip to content

Instantly share code, notes, and snippets.

@phylliswong
Last active December 12, 2018 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phylliswong/6ce064d9d98ca1fcf5667ab7c6ed5d96 to your computer and use it in GitHub Desktop.
Save phylliswong/6ce064d9d98ca1fcf5667ab7c6ed5d96 to your computer and use it in GitHub Desktop.
Square with CSS stylesheet
import React, { Component } from 'react';
import './Square2.css';
class Square extends Component {
render () {
return (
<div className='sq2-container'>
<h1 className='sq2-title'>Even better title</h1>
<p className='sq-content'>Much improved content</p>
</div>
)
}
}
html, body {
height: 100%;
}
body {
background: #333;
display: flex;
justify-content: center;
align-items: center;
font-family: Roboto sans-serif;
}
.sq2-container {
height: 300px;
width: 300px;
border: 2px solid red;
border-radius: 5px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: white;
}
.sq2-title {
margin: 0;
padding: 0;
font-family: Roboto sans-serif;
}
.sq-content {
font-family: Arial sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment