/* pdf list */ ul.pdf-list li { list-style-type: none; position: relative } ul.pdf-list li:before { display:block; position: absolute; font-family: ‘FontAwesome’; content: ‘\f1c1’; left: -20px; color: #990000; } #custom-main ul li, #main ul li { list-style-type: none; position: relative } #main ul li:before, #custom-main ul li:before { display:block; position: absolute; font-family: ‘FontAwesome’; content: ‘\f054’; left: -17px; […]
Bootstrap Left-side Tabs
The css modifications to get tabs to the left for a standard framed tab block .tabs-left .tb-tabs-framed .tab-content { border-top-width: 1px; margin-left: 149px; } .tabs-left .nav-tabs { width: 150px; float: left; } .tabs-left .nav-tabs>li { border-left-width: 1px; float: none; } .tabs-left .nav-tabs>li.active { border-bottom-color: inherit!important; border-right-color: #fff; } [raw] [tabs style=”framed” nav=”tabs” tab_1=”Title #1″ tab_2=”Title […]
Embed Font
@font-face { font-family: ‘WaterBrushROB’; /* Which font weight and style the file represents */ font-weight: normal; font-style: normal; /* For IE9 in Compatibility Mode */ src: url(‘./assets/fonts/water-brush-rob.eot’); src: /* For IE8 and older versions of IE */ url(‘./assets/fonts/water-brush-rob.eot?#iefix’) format(’embedded-opentype’), /* Super modern browsers */ url(‘./assets/fonts/water-brush-rob.woff2’) format(‘woff2’), /* All modern browsers */ url(‘./assets/fonts/water-brush-rob.woff’) format(‘woff’), /* For […]
Responsive Video
JumpStart and many themes have this built in, but just in case we ever need it. CSS: .video { position: relative; padding-bottom: 56.25%; padding-top: 20px; height: 0; overflow: hidden; } .video iframe, .video object, .video embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } HTML: <div class=”video”> <iframe width=”560″ height=”315″ src=”VIDEO […]
Woo Testimonials Quote Styling
Add this to functions.php to enable psuedo elements: function jma_child_scripts() { wp_add_inline_script(‘fontawesome’, ‘window.FontAwesomeConfig={searchPseudoElements:true}’, ‘before’); } add_action(‘wp_enqueue_scripts’, ‘jma_child_scripts’); The CSS: .quote { margin-bottom: 20px; } .quote blockquote { font: 14px/20px italic Arial, Helvetica, sans-serif; padding: 8px; margin: 5px; text-indent: 40px; border-color: rgba(253, 186, 49, 0.5); position: relative; } .quote blockquote::before, .quote blockquote::after { font-family: “Font Awesome […]
Accordion Sidebar Menu
Shows all the children under the current root item and all other root items. function jma_sidebar_addon() { global $post; $ancestors = get_ancestors( $post->ID, ‘page’ ); $ancestor_id = array_pop($ancestors); $ancestor_id = $ancestor_id? $ancestor_id: $post->ID; $root_pages = get_pages(array(‘parent’ => 0)); echo ‘<ul>’; foreach ($root_pages as $root_page) { $jma_classes = ”; $show_kids = false; $has_kids = false; if( […]
Slider Shadow
For Themeblxd Nivo Slider: .home #tb-slider-home:before { content: “”; display: block; position: absolute; bottom: -28px; left: 0; width: 100%; height: 28px; background: url(‘../images/shadow.png’) no-repeat; background-size: 100%; } The Image:
Clearfix
In the event we are dealing with some situation where it is not convenient to add the clearfix class (which is available frequently including in JumpStart), we can add the styling to the div that needs clearfix. So if we had markup like: <div class=”wrapping-div-that-i-cant-change”> <div style=”float: left; width: 45%”> Lorem ipsum dolor sit amet, […]
Custom Bullet Icons for Lists
I prefer this method because it gives me more control over bullet position. <ul class=”pdf-list”> <li><a href=”http://address.pdf”>Title</a></li> <li><a href=”http://address.pdf”>Title</a></li> <li><a href=”http://address.pdf”>Title</a></li> <li><a href=”http://address.pdf”>Title</a></li> </ul> and the css (adjust padding based on the size of the image): ul.pdf-list li { background: url(‘../images/pdf-icon.png’) no-repeat left center; padding: 3px 0px 3px 30px; list-style: none; } In this case […]