Skip to main content

Posts

Showing posts from February 7, 2014

6 Special CSS Tricks

Some CSS Tricks that you might have Missed: 1. Shorthand rule: Shorthand in CSS is very useful. It makes your code simpler and easier to edit. Moreover, it reduces the load on your server and makes downloads faster.<br /> <br /> This is what you would be doing now,<br /> <br /> <i>font-weight: bold;<br /> font-style: italic;<br /> font-variant: small-caps;<br /> font-size: 1em;<br /> line-height: 1.5em;<br /> font-family: verdana,sans-serif</i><br /> <br /> The shorthand is,<br /> <br /> <i>font: bold italic small-caps 1em/1.5em verdana,sans-serif</i><br /> <br /> 2. Two classes together: There is no rule saying that attributes need to be assigned to a single class. You can assign as many classes as you want.<br /> <br /> <i><p class="text side">...</p></i><br /> <br /> 3. CSS border default value: When put