Robert Dicks » CSS http://www.robertdicks.com Computing, football, well this and that! Mon, 31 Oct 2011 13:24:05 +0000 en hourly 1 http://wordpress.org/?v=3.2.1 Posts of the week – Twitter, WordPress, F Shape layout and a bit of fun! http://www.monicowebdesign.co.uk/weekly-articles/posts-week-twitter-wordpress/ http://www.monicowebdesign.co.uk/weekly-articles/posts-week-twitter-wordpress/#comments Fri, 10 Dec 2010 14:09:45 +0000 Robert Dicks http://www.monicowebdesign.co.uk/?p=918 http://www.monicowebdesign.co.uk/weekly-articles/posts-week-twitter-wordpress/feed/ 0 The Trouble With Top, Right, Bottom and Left – Shorthand CSS http://www.robertdicks.com/home/the-trouble-with-top-right-bottom-and-left-shorthand-css/ http://www.robertdicks.com/home/the-trouble-with-top-right-bottom-and-left-shorthand-css/#comments Thu, 28 May 2009 20:31:02 +0000 Robert Dicks http://blog.monicowebdesign.co.uk/?p=151

A few people ask me in what order do padding/margin values appear when using shorthand CSS. Many people use padding-right:10px;  padding-left:10px; eg.

#left {
padding-top:20px;
padding-left:30px;
padding-right:40px;
padding-bottom:50px;
}

Well the order for shorthand CSS is Top, Right, Bottom and Left and this can be easily remembered by using the word TRouBLe – Top-Right-ou-Bottom-Left so the CSS:

#left {
padding:20px 40px 50px 30px;
}

will give the same as the first CSS example only allot shorter!

]]>
http://www.robertdicks.com/home/the-trouble-with-top-right-bottom-and-left-shorthand-css/feed/ 2