O'Reilly logo

Teach Yourself VISUALLY™ HTML and CSS by Linda Wooldridge, 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 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 ...

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