O'Reilly logo

Sams Teach Yourself HTML, CSS and JavaScript All in One by Julie C. Meloni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Working with Margins, Padding, Alignment, and Floating

WHAT YOU’LL LEARN IN THIS CHAPTER:

• How to add margins around elements

• How to add padding within elements

• How to keep everything aligned

• How to use the float property

Now that you’ve learned some of the basics of creating web content, in this chapter you’ll learn the nitty-gritty of using CSS to enhance that content. Throughout the previous chapter, you have learned how to use basic CSS for display purposes (such as font sizes and colors). In the chapters that follow, you’ll dive in to using CSS to control aspects of your entire web page and not just individual pieces of text or graphics.

Before tackling page layout, however, it is important to understand four particular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required