Skip to content

Instantly share code, notes, and snippets.

@ungoldman
Created November 8, 2015 02:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ungoldman/1ec41500273bf41bf6bc to your computer and use it in GitHub Desktop.
Save ungoldman/1ec41500273bf41bf6bc to your computer and use it in GitHub Desktop.
positioning text over an image
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bikelandia</title>
<style>
html, body {
margin: 0;
padding: 0;
}
.hero {
background: url(http://www.planwallpaper.com/static/images/recycled_texture_background_by_sandeep_m-d6aeau9_PZ9chud.jpg) center center no-repeat;
background-size: cover;
position: relative;
min-height: 500px;
}
.text {
color: #ffffff;
font-family: Impact;
font-size: 24px;
}
</style>
</head>
<body>
<header class="site-header">
<h1>Bikelandia</h1>
</header>
<div class="hero">
<p class="text">This site is cool!</p>
</div>
</body>
</html>
@OneHwang
Copy link

OneHwang commented Nov 9, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment