O'Reilly logo

Teach Yourself Visually™ HTML5 by Mike Wooldridge

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 10

Controlling Page Layout

Want to create complex layouts on your web pages, beyond what is possible using HTML5 alone? This chapter shows you how to precisely position text, images, and other elements on your pages using style sheets. Style sheets enable you to place content at set coordinates within your layout. You can also control the spacing around your page elements, wrap text around images and tables, and even overlap content.

image

Control Layout

Set Width and Height for an Element

Use Relative Positioning

Use Absolute Positioning

Use Fixed Positioning

Set Margins

Add Padding

Align Elements Horizontally

Control the Overlap of Elements ...

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