Last active
January 22, 2016 21:47
-
-
Save ffadilaputra/0df36ec8137a17c8101e to your computer and use it in GitHub Desktop.
Centered Text In Border
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Centered</title> | |
</head> | |
<style type="text/css" media="screen"> | |
.wrap { | |
border-top:1px solid #000; | |
position: relative; | |
margin: 50px auto; | |
width: 500px; | |
} | |
.text { | |
background-color: #ffffff; | |
top: -10px; | |
position: absolute; | |
left: 200px; | |
} | |
</style> | |
<body> | |
<div class="wrap"> | |
<div class="text">TEXT GOES HERE</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment