Center well with a background image, transparent well, push footer and a button. Also some links in footer
Created
May 3, 2018 10:51
-
-
Save Aldo-f/6b9357f345ebb3d31dd9c47fcf3d65cc to your computer and use it in GitHub Desktop.
Center well with push footer
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
<body> | |
<div class="content"> | |
<div class="center col-xl-4 justify-content-md-center "> | |
<div class="relative padding text-center"> | |
<div class="well"> | |
<h1>I'm a centered text</h1> | |
<hr> | |
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. | |
</p> | |
</div><button class="btn btn-secondary">click</button> | |
</div> | |
</div> | |
</div> | |
<footer class="footer push"> | |
<ul class="nav"> | |
<li> <a href="#">About</a></li> | |
<span>-</span> | |
<li> <a href="#">More info</a></li> | |
<span>-</span> | |
<li> <a href="#">Blog</a></li> | |
<span>-</span> | |
<li> <a href="#">Examples</a></li> | |
<span>-</span> | |
<li> <a href="#">Contact us</a></li> | |
</ul> | |
</footer> | |
</body> |
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
@import url("https://fonts.googleapis.com/css?family=Montserrat"); | |
* { | |
font-size: 1.2em; | |
font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; | |
color: #c4c4c4; | |
} | |
body { | |
background: url('https://i.imgur.com/Xulubox.jpg') no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
body:before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
background-image: linear-gradient(to bottom right,#95afc0,#535c68); | |
opacity: .2; | |
} | |
.content { | |
display: flex; | |
height: 100vh; | |
justify-content: center; | |
letter-spacing: -0.05em; | |
min-height: 100%; | |
margin: 0 auto -25px; | |
align-items: center; | |
} | |
.content p { | |
font-size: 14px; | |
letter-spacing: 0em; | |
} | |
.relative { | |
position: relative; | |
} | |
.bold { | |
font-weight: bold; | |
} | |
h1, | |
p { | |
margin: 0; | |
} | |
.center { | |
-webkit-box-align: center; | |
-webkit-box-pack: center; | |
display: -webkit-box; | |
} | |
hr { | |
max-width: 50%; | |
border: none; | |
height: 2px; | |
/* Set the hr color */ | |
color: #c4c4c4; /* old IE */ | |
background-color: #c4c4c4; /* Modern Browsers */ | |
} | |
.well { | |
background-color: rgba(245, 245, 245, 0.2); | |
margin: 0.25rem; | |
padding: 1rem; | |
border-radius: 0.25rem; | |
} | |
.footer { | |
font-size: 0.4em; | |
display: inline-block; | |
position: fixed; | |
left: 0; | |
bottom: 0; | |
width: 100%; | |
text-align: center; | |
margin: 5px; | |
} | |
.nav { | |
display: inline-block; | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
text-align: center; | |
} | |
.nav li { | |
display: inline-block; | |
} | |
.nav li a { | |
display: block; | |
padding: 0 20px; | |
text-decoration: none; | |
color: #c4c4c4; | |
text-transform:uppercase; | |
} | |
.nav li a:hover { | |
text-decoration: underline; | |
} | |
footer, | |
.push { | |
height: 25px; | |
} |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment