Media object module
How do I make an media object module?
Inspired by Nicole Sullivan's media object. (http://www.stubbornella.org/?p=497 ) A re-usable (modular) media block (cfr. FB stream). What is a media object module? How do you make a media object module? This script and codes were developed by Tom Hermans on 09 December 2022, Friday.
Media object module - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Media object module</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- Experiment with media object stubbornella, necolas etc.. -->
<div id="container"> <hr> <div class="media cf"> <div class="img img-medium"> <img src="http://placekitten.com/50/50" alt=""> </div> <div class="content"> A little bit of content </div> </div> <hr> <div class="media cf"> <div class="img img-medium"> <img src="http://placekitten.com/100/100" alt=""> </div> <div class="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis adipiscing est. Curabitur vel dui dolor. Vestibulum molestie fermentum diam, nec interdum ante molestie ut. Integer consequat iaculis auctor. Duis vitae felis ligula, ultrices blandit dolor. </div> </div> <hr> <div class="media cf"> <div class="img img-medium"> <img src="http://placekitten.com/50/50" alt=""> </div> <div class="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis adipiscing est. Curabitur vel dui dolor. Vestibulum molestie fermentum diam, nec interdum ante molestie ut. Integer consequat iaculis auctor. Duis vitae felis ligula, ultrices blandit dolor. <div> <img src="http://placekitten.com/32/32" alt=""> <img src="http://placekitten.com/32/32" alt=""> <img src="http://placekitten.com/32/32" alt=""> </div> <div class="media cf"> <i class="img icon icon-a"></i> <div class="content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div> </div> </div> </div> <hr> <div class="media cf"> <div class="img icon icon-a"></div> <div class="content"> <strong><a href="#">necolas opened pull request 234</a> on <a href="#">paulirish/project</a> 20 minutes ago</strong> <div class="media cf"> <div class="img img-medium"> <img src="http://placekitten.com/32/32" alt=""> </div> <div class="content"> Added common class for long text wrap (whitespace) <div>2 commits with 10 additions and 0 deletions</div> </div> </div> </div> </div> <hr> <div class="media cf"> <div class="img icon icon-a"></div> <div class="content"> <strong><a href="#">scottjehl</a> pushed to gh-pages at <a href="#">scottjehlscottjehl/Respond</a> about 2 hours ago</strong> <div class="media cf"> <div class="img img-medium"> <img src="http://placekitten.com/32/32" alt=""> </div> <div class="content"> <div class="media cf"> <div class="img"> <img src="http://placekitten.com/20/20" alt=""> </div> <div class="content"> <a href="">9c172d8</a> updated license. MIT should be sufficient </div> </div> <div class="media cf"> <div class="img"> <img src="http://placekitten.com/20/20" alt=""> </div> <div class="content"> <a href="">8955dcb</a> updated min file </div> </div> <div class="media cf"> <div class="img"> <img src="http://placekitten.com/20/20" alt=""> </div> <div class="content"> <a href="">77ac03c</a> Merging in the comment-free parser. Respond.js no longer needs CS... </div> </div> <a href="">14 more commits ></a> </div> </div> </div> </div>
</div>
</body>
</html>
Media object module - Script Codes CSS Codes
body { margin: 0; font: 12px/1.4 sans-serif; color: #222; background: #fff;
}
#container { width: 500px; margin: 0 auto;
}
/* ----- REUSABLE IMG BLOCK ----- */
.media { overflow: hidden; _overflow: visible; zoom: 1; *zoom: 1; margin: .7rem;
}
.media:before, .media:after { display: table; content: "";
}
.media:after { clear: both;
}
.media .img { float: left; margin: 0 .5rem 0 0;
}
.media .img.alignleft { float: left; margin: 0 .7rem .7rem 0;
}
.media .img.alignright { float: right; margin: 0 0 .7rem .7rem;
}
.media .img img { display: block;
}
.media .content { display: table-cell; width: 1000rem; *width: auto; *zoom: 1;
}
.media .content .icon { display: inline-block; width: 16px; height: 16px; padding: 0; margin: 0 .3rem 0 0; background: url(http://placekitten.com/16/16);
}
.media .content .icon-a { background-position: 0 0;
}
.media .icon { display: inline-block; width: 16px; height: 16px; padding: 0; margin: 0 .3rem 0 0; background: url(http://placekitten.com/16/16);
}
.media .icon-a { background-position: 0 0;
}
Developer | Tom Hermans |
Username | tomhermans |
Uploaded | December 09, 2022 |
Rating | 3 |
Size | 3,344 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Imagemap pure css trial | 2,852 Kb |
Styled selectbox | 1,901 Kb |
Text in circle | 2,027 Kb |
Table Row Toggle | 2,829 Kb |
Simple circle cutout css | 1,577 Kb |
Responsive Form | 2,161 Kb |
Snappy snippet try | 4,189 Kb |
Sticky Navigation | 4,529 Kb |
CSS Kwicks | 2,202 Kb |
Bulleted list with font-icon snippet | 2,452 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Eunice A | Ejbronze | 2,203 Kb |
Scrolling Horizontal Isotope | Bramus | 2,017 Kb |
BenU Maintenance Site | Ksherman | 4,893 Kb |
Responsive slide | Thorien | 2,400 Kb |
Pagepilling.js | Blossk | 6,554 Kb |
Map Controls | Iliadraznin | 3,721 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
Wikipedia API | Coderpilot | 2,802 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!