$picarray[$randomkey].'';
5. Use an include. This is an extra step of sorts. If you want to make your PHP more
modular, you can copy everything within the PHP tags to an external document,
save it (e.g., as random-image.php) and then cut it into the web page as an include:
@include($_SERVER['DOCUMENT_ROOT'] . "/random-image.php");
?>
For more on working with PHP, see PHP Solutions: Dynamic Web
Design Made Easy, by David Powers.
WORKING WITH IMAGES
143
4
Hopefully you??™ve found this chapter of interest and now feel you have a good grounding
in working with images on the Web. It??™s amazing to think how devoid of visual interest the
Web used to be in contrast to today, now that images are essential to the vast majority of
sites. As I??™ve mentioned before, the importance of images on the Web lies not only in content,
but in interface elements as well, such as navigation??”a topic we??™re covering in the
next chapter.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
144
5 USING LINKS AND CREATING
NAVIGATION
In this chapter:
Introducing web navigation
Creating links
Controlling CSS link states
Mastering the cascade
Looking at links and accessibility
Examining a JavaScript alternative to pop-ups
Creating navigation bars
Working with CSS-based rollovers
Introduction to web navigation
The primary concern of most websites is the provision of information. The ability to enable
nonlinear navigation via the use of links is one of the main things that sets the Web apart
from other media.
Pages:
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229