Last active
March 29, 2019 09:32
-
-
Save joyheron/8cbf77c7b47ac9d2147ec3b239370e1c to your computer and use it in GitHub Desktop.
Layout with CSS example
This file contains 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> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<style> | |
.navbar + .container { | |
margin-top: 2rem; | |
} | |
</style> | |
</head> | |
<body> | |
<nav class="navbar navbar-dark bg-dark"> | |
<a class="navbar-brand" href="#">My App</a> | |
</nav> | |
<main class="container"> | |
<h1>My Layout</h1> | |
<h2 class="mt-3">One of my Sections</h2> | |
<div class="card"> | |
<div class="card-body"> | |
My Awesome Content here | |
</div> | |
</div> | |
<h2 class="mt-4">My last section (displayed as cards)</h2> | |
<div class="card"> | |
<div class="card-body"> | |
<div class="d-sm-flex justify-content-between"> | |
<a href="#">Link to One Thing</a> | |
<div> | |
<a class="btn btn-outline-secondary" href="#">One Action</a> | |
<a class="btn btn-outline-secondary" href="#">Another Action</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="card mt-3"> | |
<div class="card-body"> | |
<div class="d-sm-flex justify-content-between"> | |
<a href="#">Link to Another Thing</a> | |
<div> | |
<a class="btn btn-outline-secondary" href="#">One Action</a> | |
<a class="btn btn-outline-secondary" href="#">Another Action</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="card mt-3"> | |
<div class="card-body"> | |
<div class="d-sm-flex justify-content-between"> | |
<a href="#">Link to Yet Another Thing</a> | |
<div> | |
<a class="btn btn-outline-secondary" href="#">One Action</a> | |
<a class="btn btn-outline-secondary" href="#">Another Action</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment