Tips and Tricks
Archives for March 2010 « Recent Articles
Simple introduction to the CSS box model
Padding vs. Margin
Understanding padding and margins is an important concept for most CSS beginners. Mixing them up leads to incorrect usage which can trigger browser bugs and inconsistencies.
What Is Padding and Margin?
Padding is the inner space of an element which can be styled with a background while margin is the outer transparent space of an element. And in between is the elements border.
CSS Properties
- padding-top: 0px;
- padding-right: 0px;
- padding-bottom: 0px;
- padding-left: 0px;
- margin-top: 0px;
- ma…
This article requires familiarity with JavaScript and HTML.
Not to worry. If you'd like to share a box with the same html content on 25 pages or more, updating that box would be dreadfully painful. This is why updating a single JavaScript file is a quicker alternative.
Our example will include a simple box having a title (Heading 2) with a paragraph (Paragraph).
First, we'll build our box in html using the HTML widget:
<h2>Heading</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In diam tortor, vehicula nec faucibus a,…
About this channel
- 88,868 views
- 111 articles
- 251 followers
Archives
- September 2006 1
- July 2008 2
- August 2008 3
- September 2008 2
- October 2008 10
- November 2008 5
- December 2008 1
- January 2009 1
- February 2009 1
- March 2009 2
- June 2009 2
- July 2009 3
- August 2009 1
- September 2009 1
- October 2009 2
- November 2009 1
- January 2010 2
- February 2010 1
- March 2010 2
- June 2010 2
- May 2011 2
- December 2011 1
- February 2012 1
- January 2014 1
- March 2014 1
- April 2014 1
- May 2014 4
- June 2014 3
- August 2015 1
- July 2016 1
- August 2016 1
- November 2016 2
- January 2017 2
- February 2017 2
- March 2017 5
- April 2017 4
- May 2017 5
- June 2017 4
- July 2017 4
- August 2017 5
- September 2017 4
- October 2017 4
- November 2017 5
- December 2017 2
Page Options