Jennifer Zelazny

Random and Opinionated Thoughts

Tag: padding

CSS General jappler.com

helpful css tips.

Posted by: Jennifer Zelazny | 0 Comments

Over the years, I have wasted a lot of time on “guessing” what would work and what would not work. Anyone just starting with CSS or looking to modify someone else’s CSS will hopefully find these tips helpful and time saving. Padding or Margin? These two attributes are often used, and more often confused. The margin attribute defines the space around an HTML element’s border. The padding attribute refers to the space within the border. Example: p.marginex { margin:20px; border:1px solid #ccc; } p.paddingex { padding:20px; border:1px solid #ccc; } This illustrates using margins. This illustrates using padding. Class(.) selector... Read More » Read more