The HTML src attribute supports frame, iframe, img, input and script elements. It does not support the div element. But HTML 5 gives us the "data" attribute that lets us define custom attributes within HTML elements. We can create whatever we want: <div data-brand=..., <div data-mymusic=... etc. So we can also have <div data-src=... We can retrieve the value of the "data-" attributes by using getAttribute() and then use the output in all sorts of javascript ...
Updated 08-16-2014 at 10:33 PM by molendijk
Images can be tricky to deal with in a responsive environment; by nature they are a 'static' element with specific dimensions, so how can we manipulate them into working with our lovely fluid/flexible web layouts? Thankfully there are a few techniques, and this post rounds up my top 3. Please note, this article mostly covers visual resizing in a web browser, and not any "true" responsive image techniques, i.e. serving different images to different screen sizes. These are ...
Updated 08-16-2014 at 10:26 AM by Beverleyh
In the old days, many designers used frames within framesets to present documents in multiple views. This allowed them to modify the menu for the whole site by just updating the page in the navigation frame. And visitors could go from one (content) page to another without causing a page (re)load in the navigation frame (or another frame). Framesets were abandoned when people started to realize that their benefits didn't outweight their numerous problems and that other ways of updating ...
It is surprisingly easy to create iframes that go on top of windowed elements (Flash, select boxes etc.): Code: <iframe name="ifr" style="position:relative; z-index:10000; background: white" onload="frames['ifr'].document.body.innerHTML='This is an iframe that overlays windowed elements if the zindex is high enough'"></iframe> The onload-part will cause the text to overlay any windowed element if the zindex is high enough (except in Safari). Position: ...
<iframe name="ifr" style="position:relative; z-index:10000; background: white" onload="frames['ifr'].document.body.innerHTML='This is an iframe that overlays windowed elements if the zindex is high enough'"></iframe>
Updated 08-09-2014 at 03:52 PM by molendijk
My modal gallery has evolved and here come versions 4 and 5. Both now include pagination but version 5 is PHP generated to help with maintainability. First, a recap on the gallery development so far; Version 1: Responsive CSS3 Modal Gallery (no JavaScript)Version 2: Responsive CSS3 Modal Gallery (with JavaScript on-demand images)Version 3: Responsive CSS3 Modal Gallery (with JavaScript on-demand images + keyboard controls) Now, so far, this gallery has only ...
Updated 07-10-2014 at 10:49 AM by Beverleyh