Over time we all learn little nifty coding tricks that help us solve common problems or anticipate potential bugs. What's your favorite CSS or JavaScript tip for beginners and professionals? What do you keep using often in your design or development work?
[+] [-] geuis|14 years ago|reply
Script tags just work (no need for type="text/javascript": <script></script>
CSS
Understand how to do general vs specific border/margin/etc assignments and how they cascade. Useful for generic
classes:
.class1{ border:1px solid #000; }
.sub_class1{ border-bottom:2px solid #cc0000; }
JS
0|3.14 === 3, vs Math.floor(3.14) === 3
[+] [-] jimmynewtron|14 years ago|reply
[+] [-] proexploit|14 years ago|reply
[+] [-] Flam|14 years ago|reply
[+] [-] ontouchstart|14 years ago|reply