• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part 1: Part 1: Cascading Style Sheets > Border and Margin Controls

Chapter 7. Border and Margin Controls

In the physical world, atoms are the building blocks for all larger objects. Every type of atom has its own unique properties, but when bonded with other atoms, they create larger structures with properties different from the parts—molecules.

Likewise, HTML tags are the building blocks of your Web page. Each tag has its own unique capabilities, and tags can be combined to create a Web page that is greater than the parts.

Whether a tag is by itself or nested deep within other tags, each tag can be treated as a discrete element on the screen and controlled by CSS.

I use the concept of the box as a metaphor to describe the various things that you can do to an HTML element in a window, whether it is a single tag or several nested tags. This box has several properties—including margins, borders, padding, width, and height—that can be influenced by CSS.

In this chapter, I'll show you how to control the box and its properties.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint