Book Image

Practical Web Development

By : Paul Wellens
Book Image

Practical Web Development

By: Paul Wellens

Overview of this book

Table of Contents (23 chapters)
Practical Web Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
10
XML and JSON
Index

<div>, the "uebertag"


Finally, there is the <div>, the tag of all tags. When you run into a problem trying to fit things on the page where you want them, you will most likely solve it by inserting a number of <div> elements. Think of a <div> as a rectangular section of your page. You can even organize your page as a grid. The framework we will be using in the second half of the book is exactly that. It uses a 12-column grid.

Look at this very simple, yet not uncommon example:

<body>
<div id="header"></div>
<div id="container">
<div id="left"></div><div id="middle"></div><div id="right"></div>
</div>
<div id="footer"></div>
</body>

Just make this the body of a new HTML page, minigrid.html, and look at it. You will see ... nothing, because none of the <div> elements have any content, in which case they do not have any size. <div> elements are so-called block elements. We will...