Topic: CSS Shorthand Pages that link to <a href="https://ozoneasylum.com/backlink?for=24006" title="Pages that link to Topic: CSS Shorthand" rel="nofollow" >Topic: CSS Shorthand\

 
Author Thread
MIDI
Paranoid (IV) Inmate

From: Georgia
Insane since: Dec 2002

IP logged posted posted 11-11-2004 19:50 Edit Quote

Does anyone know of a good site to learn css shorthand?
Thanks in advance guys...

Nathus
Bipolar (III) Inmate

From: Minnesota
Insane since: Aug 2003

IP logged posted posted 11-11-2004 20:07 Edit Quote

http://home.no.net/junjun/html/shorthand.html

Another one just for fonts specification. Has a good way to remember the proper order.
http://www.simiandesign.com/blog-fu/2004/07/more_css_shorth.php

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

IP logged posted posted 11-11-2004 20:35 Edit Quote

Another CSS shorthand: When setting a property having a top, right, left, bottom versions( e.g. border-color, padding, border-width, margin, border-style ... ), the first one is the top and then the other goes clockwise. And if one is missing, its value is that of its opposite side.

code:
margin: 10px 20px; /* see point 1 */
border-width:10px 20px 30px; /* see point 2 */
border-style:solid dashed double none; /* see point 3 */

  1. sets the top and bottom margin to 10px and the right and left to 20px.
  2. sets the top border-width to 10px, the bottom one to 30px and the right and left one to 20px.
  3. sets the top border-style to solid, the right one to dashed, the bottom one to double and finally the left one to none.

All this is explained in CSS2 specifications: 8.5.1 Border width.

Hope that helps,

JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

IP logged posted posted 11-11-2004 21:08 Edit Quote

w3schools CSS is good as usual. You can choose an element from <that< page then pick the "On-line examples" link for that element and normall there's an example called "All the >element< properties in one declaration" where you can play around with an online editor.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu