Chapter 12. Controlling Layout with Style Sheets

Want to create complex layouts on your Web pages beyond what is possible using HTML alone? This chapter shows you how to use style sheets to precisely position text, images, and other elements on your pages. You can also control the spacing around those elements and even overlap them.

Controlling Layout with Style Sheets

Control Layout 228

Set Width and Height for an Element. 230

Use Relative Positioning. 232

Use Absolute Positioning 234

Use Fixed Positioning 236

Set Margins 238

Add Padding 239

Wrap Text around Elements. 240

Change Vertical Alignment 241

Create a Centered Layout. 242

Control the Overlap of Elements 244

Hide an Element. 246

Customize ...

Get Teach Yourself VISUALLY™ HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.