Blog Comments

  1. Beverleyh's Avatar
    That would be good but unfortunately the data saved in local storage can only be accessed by the browser that created it - more info here

    For cross browser (in the sense of one browser using data stored via another browser) support, I think we'd be looking at user IDs/accounts and databases
  2. molendijk's Avatar
    Hello Beverleyh,
    Nice! Would it be possible to make this also work for visitors who click on a link using a given browser, and then come back to the page (containing the link) using another browser? (If so, YouTube would be interested!).
  3. Beverleyh's Avatar
    The PHP code/logic from the article above can also be used to opt out of responsive website design to allow users to view fixed width desktop layouts on mobile devices:
  4. Beverleyh's Avatar
    Here's how to use Selectivizr to make the Modal Gallery work, with all features, on IE8 too:
  5. Beverleyh's Avatar
    If you'd prefer to use a dropdown select box, you can make a simple one like this;
    <select onchange="if(this.value)window.location.href=this.value">
        <option value="">STYLES - Please Select - :</option>
        <option value="?css=<?php echo $lightcss;?>">Light</option>
        <option value="?css=<?php echo $darkcss;?>">Dark</option>
        <option value="?css=<?php echo $default;?>">Default</option>
  6. Beverleyh's Avatar
    Basic support has now been added for IE7. Content is accessible via a scrollbar, like it is in IE8.
  7. Beverleyh's Avatar
    Basic support has now been added for IE7. Content is accessible via a scrollbar, like it is in IE8.
  8. Beverleyh's Avatar
    If you want to remove the 300ms delay on touch devices, try the SwiftClick script that can be found on this page:

    Notice how everything responds instantly - a tap on an arrow or the active-area play/pause toggle - Nice.
  9. Beverleyh's Avatar
    This may also be of interest - a responsive grid of images, which incorporates method 2 from above for fluid/responsive scaling:

    Also see diamond grid images:
  10. Beverleyh's Avatar
    Just a note that this menu has been replaced with a version that has better tap-support for the desktop view on large screen touch devices;

    UPDATED Responsive CSS3 Multi-Level, Drop-Down Menu (no JavaScript):

    UPDATED Responsive CSS3 Multi-Level, Drop-Down Menu (with JavaScript enhancement):

    And for a menu where sub-menu drops-downs can be closed by tapping anywhere in the surrounding area, try this:
  11. Beverleyh's Avatar
    Ah, I see what you mean. Good catch!

    No problem - the fix is to add this to the desktop CSS media query;
    .container, #menu, #menu .sub-nav { -webkit-transform:translate(0,0) !important; -ms-transform:translate(0,0) !important; transform:translate(0,0) !important }
    I'll update the demo (and the other menu scripts, as I imagine they'll all need this little snippet too) shortly.

    Just heading off home for the weekend. Have a good one!
  12. molendijk's Avatar
    Hi Beverleyh,
    Just a quick thing I noticed when I resized from fullscreen to a size where the mobile-icon appears. If after a click on the icon I return directly to fullscreen mode, part of the horizontal menu is cut off / becomes invisible.
  13. Beverleyh's Avatar
    To remove the 300ms touch delay and make the fly-out menus contract again on large touchscreen devices, please install the SwiftClick script from the source of this page:

    The article to support this update is here:
  14. molendijk's Avatar
    Ah, I see. Thanks.
  15. Beverleyh's Avatar
    Yes, but wouldn't that just preserve the original aspect ratio, doing the same thing as the 1st method?:

    The rest of this post (Demo 2 and 3) is to demonstrate image scaling and ratios that change within responsive design - e.g. shifting from a wide 5:1 ratio on desktop, to a squarer 2:1 ratio on mobile, which typically produces more visually pleasing results that maintain artistic direction in fluid/flexible layouts.
    Its probably most evident in this demo:

    All 3 methods have their merits - #1 is more convenient for user-generated content, while #2 and #3 are more useful from a design perspective - think of them as a way of fake-cropping to retain visual impact at small sizes.

    If I have misunderstood your description though, and it doesn't behave as demo 1 does, let me know.
    Updated 08-14-2014 at 10:38 PM by Beverleyh
  16. molendijk's Avatar
    Hi Beverleyh,
    Maybe I'm being naive, but can't we scale images in a more simple way by giving them EITHER a size in percentages for the width OR a size in percentages for the height (not both!).
    If we give them a size in percentages for the width, we can add a max-width and/or a min-width.
    If we give them a size in percentages for the height, we can add a max-height and/or a min-height.
    This will always preserve the width-height ratio.
  17. Beverleyh's Avatar
    To demonstrate the on-demand image script, see this YSlow component report showing only 4 images downloaded - 3 thumbs from the first page of the gallery, plus the header logo (there are 18 gallery images in total!).

    And the YSlow component report showing only 9 images downloaded - 8 thumbs from the first page of the PHP gallery, plus the header logo (there are 80 gallery images in total!).

    Now considering that the 80 images in the PHP gallery (40 thumbs, 40 enlargements) weigh in at just over 3MB altogether, that's a BIG difference for a page that YSLOW reports as 144.5kb. The on-demand image script saves around 2.85MB
    Updated 07-10-2014 at 12:13 PM by Beverleyh (saving stats added)
  18. Beverleyh's Avatar
    What the?.... Somebody had my menu listed and was selling it on codecanyon. I posted it here on 1st April, and the unscrupulous person started selling it about 10 days ago (17th June?). I stumbled on the listing via this Tweet:

    How cheeky!

    The listing has now been pulled but I took screen caps of what they copied and sold as their own. The markup structure, CSS and comments, even the wording of the features list and meta description was a blatant copy.
  19. Beverleyh's Avatar
    A saving is still a saving. And this would be used on a live site, not necessarily what you'd be expected to edit and work on during build stages. As part of your workflow you can use 'beautifying' tools to convert the minified CSS/JS/HTML back and forth when you need to make changes, there isn't really an issue.

    Here are examples of to such 'beautification' tools:

    Dirty Markup: and
    CSS Beautify:
  20. bernie1227's Avatar
    The only issue with that however, is that it seriously reduces code readability, for such a small tradeoof.
Page 2 of 3 FirstFirst 123 LastLast