Different Stylesheets for Differently Sized Browser Windows
Otherwise known as “resolution dependent layouts”. Single website, different CSS files for rearranging a website to take advantage of the size available.
…
Founder, writer, designer, spam-deleter, email personality
Otherwise known as “resolution dependent layouts”. Single website, different CSS files for rearranging a website to take advantage of the size available.
…
Labels should have “for” attributes that match the ID of the input they are labeling. This means we can snag that attribute and use it in a selector to trigger a click on the input itself. Assuming of course you …
<?php
$rand = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
$color = '#'.$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)];
?>
Then echo out the $color value anywhere you need it. For example:
<body style="background: <?php
… I made a thing. The idea is to have a super-quick, nearly mindless way to get a critique-based conversation thread going based on any URL. See:
http://critiquethesite.com/css-tricks.com (it works best with big wide monitors, since there is the fixed left …
We have a client who sells a product in which customers specify a gift message when they check out. The site has been very successful for them and orders are coming faster than expected. The have been hand-writing the notes …
I built a site for a musician friend of mine who is putting out a new album. Clearly having playable tracks is important, but the classic issue of having those tracks stop when a new page is loaded comes up …
Do you know what the difference between these selectors are?
ul li { margin: 0 0 5px 0; }
ul li { margin: 0 0 5px 0; }
I’ll admit it took me longer than it probably should have (way …
One of the hurdles (and “ah-ha” moments) in learning CSS is this business about clearing floats. If you have no idea what I’m talking about, check out the classic All About Floats.
I specifically want to talk about …
Replace instances of “yourPluginName” with your actual plugin name. The stuff about “radius” is just an example of an option (parameter to pass plugin).
(function($){
$.yourPluginName = function(el, radius, options){
// To avoid scope issues, use 'base' instead of 'this'
… It should be said, first and foremost, that you should try to keep your styling and your JavaScript away from each other. If you want to change the style of an element with JavaScript, add (or remove) a class name …