Fire Studios

Archive

Contact

Categories

  • Coding
    • CSS
    • HTML/Javascript
    • PHP
  • Design
  • Freebies
  • General
  • Internet
  • Interviews
  • Plugins
  • Podcasts
  • Reviews
  • Screencasts
  • Tutorial
  • Weekday Tips
  • Wordpress

Podcast

Weekday Tip: CSS Shorthand pt.1

Weekday Tip: CSS Shorthand pt.1

Margin & Padding

The CSS properties "margin" and "padding" allow the use of shorthand declarations, meaning we can state all the "-top", "-left", "-bottom", and "-right" attributes in one call.

margin: [top] [right] [bottom] [left];
margin: [top&bottom] [left&right];
margin: [top] [left&right] [bottom];
margin: [top&left&bottom&right];

padding: [top] [right] [bottom] [left];
padding: [top&bottom] [left&right];
padding: [top] [left&right] [bottom];
padding: [top&left&bottom&right];

Reader's Thoughts

  • Scott Radcliff

    You have an error in your information and I didn't see your email address on the page. Top Left Bottom Right is incorrect. It should Top Right Bottom Left.

  • Fire G

    Thanks for catching that!

Your Thoughts?

 

This is that small text that tells you not to steal our stuff, but we don't really care too much.