WordPress Mobile Web Development:Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Chapter 3. Setting up Media Queries

We've spent some time looking at some of the off-the-shelf methods of making your WordPress site mobile, in the form of plugins and responsive themes. But what do you do if you have a site with a pre-existing theme and you want mobile visitors to see a site which is consistent with that theme? Or if you're frustrated by the fact that the plugins don't display all the content of your site? Or if you just aren't that keen on the available responsive themes?

The answer is to write responsiveness into your theme.

In this chapter we will learn the basic building blocks you need in place for a responsive theme, including the following:

  • A fluid layout
  • Media queries
  • Instructions to mobile devices to display your site at the correct scale

We will also examine the different devices you can target when designing a responsive theme, and identify some of the considerations for each of them.

Note

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.