Skip to content

Instantly share code, notes, and snippets.

@vuonglam94
vuonglam94 / trick2.html
Created July 2, 2018 03:27
How to prevent a line break with an H1, H2, H3, H4, H5, H6 tag
<style>
h1, h2, h3, h4, h5, h6 {
display: inline;
}
</style>
@vuonglam94
vuonglam94 / backgroundFullHeight.js
Last active June 27, 2018 07:16
[JQuery] Set div background = height of window screen
$(function(){
$(window).resize(function() { // resize window event
var screen_height = $(window).height(); // get window height
$('.test').css({'height': screen_height}); // set height of div class="test"
});
})
@vuonglam94
vuonglam94 / divVerticalAlignMiddle.css
Last active June 27, 2018 07:16
[HTML-CSS] Div vertical-align: middle in another div
/*CLASS OUTER DIV*/
.outer {
display: table;
}
/*CLASS INNER DIV*/
.inner {
display: table-cell;
vertical-align: middle;
}