468 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT (Web space)
468 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT Figure 17-5. Main content commented out Before moving onto building a layout from these pieces, you need to make one more change to the basic structure. You can see in Figure 17-2 that the combination of main content and sidebar B does not fill the width of the theme. Similarly, the main content with no sidebars is also too narrow. To resolve this problem, you can define three CSS classes that specify different widths for the main content, as shown in Listing 17-6. Listing 17-6. Special Class Rules in style.css #main-content { float: left; text-align: left; padding: 0 10px 0 5px; } .main-content-norm { width: 340px; } .main-content-wide { width: 530px; } .main-content-full { width: 720px; } This way, you can specify in the code of the template which width to use. Listings 17-7 and 17-8 show the changes in index.phpand the main-content.phpinclude file to continue using the default value. I ll explain how this code works in the next section. Listing 17-7. Setting the Class Variable in index.php
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.