Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Web Page Design
- Image Spacing and Borders
- The Old Background Banner Trick
- Specifying Image Width and Height
- Summary
- Q&A
- Workshop
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
The Old Background Banner Trick
One of the most prominent tricks employed in Figure 13.3 is the use of a 1,000-pixel-high background image (named wainscot.gif). Because the entire page is unlikely to be more than 1,000 pixels high, the background only appears to repeat in the horizontal direction. Since the bottom part of the image is all the same color, it looks like the background is only a banner at the top of the page.
Unlike a foreground image used as a banner, however, this wainscoting will automatically size itself to go from "wall to wall" of any sized window. It takes up less space on a disk and transfers over the Internet faster because only one repetition of the pattern needs to be stored.
If you use this trick to make background banners on your own Web pages, you should make them at least 2,000 pixels high. The page shown in Figure 13.3 can actually become longer than 1,000 pixels when someone uses a very large font size, in which case the wainscoting shows up again at the very bottom or middle of the page.
By using a very wide background that repeats vertically, you can easily make a repeating banner that runs down the left side of a page, too. If you don't want text to obscure the banner, put a very large, totally transparent image at the beginning of the HTML page with <img align="left" />.
Figures 13.4 through 13.6 show the HTML and graphics that implement a left-side banner, as well as the resulting Web page.
Note that I right-justified the other graphics, both for aesthetic reasons and so that I could avoid using <br clear="left" />, which would skip all the way to the bottom of the left-justified banner graphic.
Figure 13.4 With a few strategic changes, you could put the top banner in Figure 13.3 to the left side.
Specifying Image Width and Height | Next Section

Account Sign In
View your cart