Created
June 20, 2020 22:07
-
-
Save graphicbeacon/002fed4e491d4bc2f9bf496dfa998f26 to your computer and use it in GitHub Desktop.
Centering card with Materialize example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<!-- Compiled and minified CSS --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<!-- Compiled and minified JavaScript --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> | |
</head> | |
<body> | |
<div class="valign-wrapper grey"> | |
<div class="row"> | |
<div class="col s12 m6 offset-m3"> | |
<div class="card blue-grey darken-1"> | |
<div class="card-content white-text"> | |
<span class="card-title">Card Title</span> | |
<p>I am a very simple card. I am good at containing small bits of information. | |
I am convenient because I require little markup to use effectively.</p> | |
</div> | |
<div class="card-action"> | |
<a href="#">This is a link</a> | |
<a href="#">This is a link</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
height: 100%; | |
} | |
.valign-wrapper { | |
height: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment