Megadropdown menu with selfexplanatory CSS Used in corporate and ecommerce sites normally Explained as simply as possible with as few styles and HTML markup. Uses flexbox
// INJECTING THE HTML | |
document.querySelector('body').innerHTML += '<div id="injection">Hello World</div>'; | |
// CSS INJECTION FUNCTION | |
//https://stackoverflow.com/questions/707565/how-do-you-add-css-with-javascript | |
function insertCss( code ) { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
if (style.styleSheet) { | |
// IE |
A demonstration of how to overflow box grid layouts
Hover over a rubberducky box to see the results
Uses a combination of hover, :before pseudoselectors, specific right and bottom borders.
A Pen by Vincent Tang on CodePen.
A demonstration of how to overflow box layouts
Pt2 demonstrates how you can overclip a partial text to resize the entire box
Uses a combination of hover, :before pseudoselectors, specific right and bottom borders.
A Pen by Vincent Tang on CodePen.
Hiding overflow child flexbox items
based on for overflow: https://stackoverflow.com/questions/9333379/javascript-css-check-if-overflow
and for toggleText https://stackoverflow.com/questions/5584010/jquery-toggle-html-text
Hiding overflow child flexbox items Now targeting multiple elements at a time And targeting non elements as well Useful in largely condensed notetaking application and/or ecommerce shopping
based on for overflow: https://stackoverflow.com/questions/9333379/javascript-css-check-if-overflow
/* Remove all Vertical lines except first 1 in current view */ | |
.Node.is-currentRoot .Node .Node > .Node-children { | |
border-left: 0px !important; | |
} | |
/* Make Remaining Lines Green */ | |
.Node.is-currentRoot .Node .Node-children { | |
border-left: 1px dotted green !important; | |
} | |
/* Hide All Bulletpoints (1st and 2nd in current view) */ |
- for (var x = 0; x < 13; x++) | |
.qty-holder | |
button.qty-dec - | |
input(type="number" value="1").qty-adj | |
button.qty-inc + |