View RSS Feed

All Blog Entries

  1. A Single-Page Application without Framework

    A Single-Page Application is a website that fits on a single page. All necessary code is retrieved with a single page load or dynamically loaded and added to the page as necessary. The page does not reload at any point in the process unless it is manually refreshed. This provides a more fluid user experience.
    SPA has been adopted by several javascript frameworks such as AngularJS, Ember.js, Meteor.js and ExtJS. But these frameworks are overkill in regards to what is needed for a SPA to function ...
    Categories
    Uncategorized
  2. Img Src to Background-Image - Dealing with images inserted via a CMS

    This small JavaScript function converts the src attribute of an <img> tag into a CSS background-image, where background-size:cover; kicks in for visual containment and faux-cropping. In other words, it forces image size to be consistent.

    Backstory
    While I've been working with folks who update their own web pages - training them to use a CMS and the likes - one common issue that crops up has to do with the arrangement of images on a web page. Inevitably, at some point, ...
  3. iOS 'Sticky Hover' Fix - Unhovering dropdown CSS menus

    One line of JavaScript to fix the 'sticky hover' problem on iOS; Where hover CSS isn't removed from an active element until another focusable element (button, link) is clicked. With this script, a tap of the surrounding area will remove hover CSS.

    What's the problem?
    In the opening paragraph, I state that a problem with hover activated CSS on iOS is that hover styles aren't removed until another element takes focus. A notable case for this is with CSS-only dropdown menus - ...

    Updated 05-30-2016 at 12:20 PM by Beverleyh

    Categories
    JavaScript & Ajax , CSS related , Web Design issues
  4. A URL-driven tabbing system

    There are many 'tab content scripts' on the web that let you organize hidden DIV contents into a tab interface, with the desired content appearing when a tab is clicked on.
    But most of the time, these scripts merely do that and nothing else. They don't add entries to the browser's history, which implies that the 'panels' are not bookmarkable / that the native browser's back/forward button does not change the state of the selected tabs. And if the scripts use the hash tag for correcting this, ...

    Updated 06-05-2016 at 10:18 PM by molendijk

    Categories
    Uncategorized
  5. The Easy Way to Absolute Center (vertical + horizontal alignment)

    I hit a snag recently when I wanted to absolutely center a responsive image and couldn't use my 'go-to' method of CSS3 transforms, due to other conflicting CSS3 keyframe animations that were cancelling it out;
    Code:
    img { 
    	max-width: 100%; 
    	max-height: 100%; 
    	position: absolute; 
    	top: 50%; 
    	left: 50%; 
    	-webkit-transform: translate(-50%,-50%);
    	-ms-transform: translate(-50%,-50%);
    	transform: translate(-50%,-50%)
    }
    Here's ...

    Updated 05-28-2016 at 07:23 AM by Beverleyh

    Categories
    CSS related , Web Design issues
Page 1 of 26 12311 ... LastLast