Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
centerimg.sublime-snippet
<snippet>
<content><![CDATA[
<div class="jumbatron">
<div class="jumbatron__img">
<img src="img/big_img.jpg" alt="">
</div>
</div>
styles
.jumbatron
position: relative
top: 0
left: 0
width: 100%
overflow: hidden
display: block
height: 700px
z-index: 1
&__img
position: absolute
width: 2000px
left: 50%
margin-left: -1000px
text-align: center
height: 700px
img
height: 100%
width: auto
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>centerimg</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.