Skip to content

Instantly share code, notes, and snippets.

@SBoudrias
Created November 20, 2012 03:59
Show Gist options
  • Save SBoudrias/4115868 to your computer and use it in GitHub Desktop.
Save SBoudrias/4115868 to your computer and use it in GitHub Desktop.
/*
* Défi intégrateur 1 (http://blog.goetter.fr/post/36084887039/tes-pas-cap-premiere-edition)
*/
.title1 {
text-align: center;
}
.title1:before,
.title1:after {
content: " ";
display: inline-block;
vertical-align: middle;
border-bottom: 1px solid black;
width: 200px;
}
.title2 {
text-align: center;
position: relative;
}
.title2:after {
content: " ";
border-bottom: 1px solid black;
position: absolute;
top: 50%;
left: 0;
right: 0;
}
.title3 {
display: table;
table-layout: fixed;
width: 100%;
text-align: center;
}
.title3:after,
.title3:before {
content: " ";
display: table-cell;
border-bottom: 1px solid black;
}
<h1 class="title1">Titre h1 centré</h1>
<h1 class="title2">Titre h1 centré</h1>
<h1 class="title3">Titre h1 centré</h1>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment