about 13 days ago Good morning sleepy Atlanta. http://t.co/itZsJbAe
about 22 days ago Best cube mate ever. http://t.co/zriItuGt ht @sbcunningham
about 28 days ago Paulaner swirl. http://t.co/5qMnVarb #flixel
about 28 days ago Bird watching. http://t.co/YtILBmSQ #flixel
about 29 days ago @KeyWestWatch that's his actual schnozzola.
about 29 days ago @KeyWestWatch neat little program that lets me make animated still photos. Can u see his nose sniffing?
about 29 days ago Sniff sniff. http://t.co/6jLebpoB #flixel
about 29 days ago Trying out flixel. http://t.co/kFQBrvT7 #flixel
15 Apr 2012 Tilly has taken over the dog bed. It's now her nest. http://t.co/IHukAATB
11 Apr 2012 33 animals that are disappointed in you. http://t.co/Njlac8wE
8 Apr 2012 Taking a break from my from Henry to say hai! http://t.co/Hk8Lof46
7 Apr 2012 @KeyWestWatch sometimes dead tree form is the best way.
6 Apr 2012 Steve is my copilot. About time this Macgeek read his bio. http://t.co/EHCHNBIv
6 Apr 2012 @Urvaksh if so, what does that make you not having a DVR?
5 Apr 2012 The Basics of Using Online Social Networks to Boost Local Business http://t.co/G3MN8iTf
5 Apr 2012 RT @mashableapple : Find Out if Your Mac Has the Flashback Trojan -- the Fast and Easy Way - http://t.co/eI8EK5YZ

From the Blog

End of the week thunderstorms
08/20/2010 | E. Lee Cunningham

Its been a great week for ELC Innovations, even as thunderstorms rumble past late Friday afternoon. As a company we have grown beyond one of my first  [ ... ]


Why Facebook's new Places is bad
08/18/2010 | E. Lee Cunningham

It was only a matter of time before social networking giant Facebook came out with an answer to foursquare, the most popular – up until now – way  [ ... ]


Other Articles
CSS Help: Margins vs Padding

I have to admit, when I first started into the world of CSS development, I was confused at the difference, and proper use of Margins and Padding. However, for my print design friends, particularly those that use InDesign, you may want to think of Margins as the runaround, and the Padding as the text inset.

In this post, we’ll explain the difference between padding and margins, how the box model effects browsers and some tips and tricks dealing with cross-browser issues.

What are margins?

Beginning developers often use margins and padding interchangeably, but there is a difference.

Margins are the spaces around an element. In order for margins to work properly, the element must be floated or positioned relative. This style is often used to move the element it’s applied to, or to move other elements around it.

Margins

An element can have equal margins on all sides of it, which is simply written as:

element { margin: 5px; }

This gives an equal 5px to every side of an element. Elements can have any combination of margins, and it can be written to define it in a string, or can be address a specific side:

element { margin: 5px 10px 2px 4px; } /*margin: Top, Right, Bottom, Left*/
element { margin-left: 4px; margin-right: 10px; margin-top: 5px; margin-bottom: 2px; }

There are a few IE issues with margins that probably cause most of all IE layout problems.

  • Double margins – The double margin bug in IE6 is probably the hardest bug developers struggle with. If any element is floated and has a margin in the same direction, IE6 will double that margin. So if you have an element that is floated left and also has a margin of 5px to the left, IE6 will give it a left margin of 10px.
  • Bottom margins – All IE versions like to ignore bottom margins, so it’s better to use padding for bottom spacing instead.

What is Padding?

Like margins, padding is the space around an element. However unlike margins, which deal with the space around the outside of an element, padding effects the space inside the element, but in a strange way discussed below.

Padding can can be written in a similar way as margins in your CSS:

element { padding: 10px; }
element { padding: 5px 10px 2px 4px; } /*padding: Top, Right, Bottom, Left*/
element { padding-left: 4px; padding-right: 10px; padding-top: 5px; padding-bottom: 2px; }

The way padding is handled in the browser is called the box model. IE6+ (in standards mode), Firefox, Safari and Chrome all handle the calculations of padding the same.

So how does the box model and padding work? Let’s say the element below is 100px in width and height.

padding

If you give the element an equal padding of 10px because you don't want the text touching the edges of the element, the padding didn’t push the text inside the element, it just made the element itself bigger!

padding

This is where the idea of the box model comes in. Adding 10px of padding to an 100px element will increase it’s dimensions to 120px. (100px element + 10px top + 10px bottom = 120px).

So if we wanted to keep the element only 100px in height and width, but push the contents inside the element by 10px, we’d need to adjust the actual dimensions to 80px in height and width. Then our element would look like:

padding

Unlike margins, an element with padding does not need to be floated or positioned relatively for it to work, if it’s dealing with padding on the inside of the element. However, if you’re using padding to move the element (or another element around it), it does need to be floated or positioned.

 

Design Services

ELC Innovations offers customized, professional visual design solutions for a broad range of printed and web marketing materials. We will plan, develop, and deliver any size project from small one-off logos, business cards, and brochures to comprehensive branding & identity packages and informational or eCommerce websites.

Online Services

ELC Innovations will work with you to create the best possible website for you business. The business websites we design combine original graphics and cutting edge web features such as simplified e-commerce and database management with innovative solutions to organizing and presenting our clients' message and important information. In addition to building custom websites, ELC Innovations provides outstanding ongoing site maintenance services. We will work with your business to help fill your support needs.

Business Solutions

ELC Innovations is ready to solve your business needs. With so many technology solution choices for your business, how do you know which to choose? We spend a lot of time reviewing and researching technology solutions, so chances are we can help you make the choices about which tools to are best for you. Let us help you assess your business requirements and make recommendations with regard to your network equipment, selecting the appropriate email service and software packages, etc. We are happy to train you and your staff on any number of tools, and help you establish a brand identity
Search

Follow ELC Innovations

Facebook Page Linked In Twitter
Hosted with:  Lunarpages.com Web Hosting
-->