tailieunhanh - Phát triển web với PHP và MySQL - p 16
Reusing Code and Writing Functions CHAPTER 5 125 LISTING —The Reusable Header for All TLA Web Pages TLA Consulting Pty Ltd h1 {color:white; font-size:24pt; text-align:center; font-family:arial,sans-serif} .menu {color:white; font-size:12pt; text-align:center; font-family:arial,sans-serif; font-weight:bold} td {background:black} p {color:black; font-size:12pt; text-align:justify; font-family:arial,sans-serif} {color:white; font-size:9pt; text-align:center; font-family:arial,sans-serif; font-weight:bold} a:link,a:visited,a:active {color:white} TLA Consulting . | Reusing Code and Writing Functions 125 Chapter 5 Listing The Reusable Header for All TLA Web Pages html head title TLA Consulting Pty Ltd title style hi color white font-size 24pt text-align center font-family arial sans-serif .menu color white font-size 12pt text-align center font-family arial sans-serif font-weight bold td background black p color black font-size 12pt text-align justify font-family arial sans-serif color white font-size 9pt text-align center font-family arial sans-serif font-weight bold a link a visited a active color white style head body -- page header -- table width 100 cellpadding 12 cellspacing 0 border 0 tr bgcolor black td align left img src td td h1 TLA Consulting h1 td td align right img src td tr table -- menu -- table width 100 bgcolor white cellpadding 4 cellspacing 4 tr td width 25 img src span class menu Home span td td width 25 img src span class menu Contact span td td width 25 img src span class menu Services span td td width 25 img src span class menu Site Map span td tr table 5 Reusing Code and Writing Functions 126 Using PHP Part I Listing The Reusable Footer for All TLA Web Pages -- page footer -- table width 100 bgcolor black cellpadding 12 border 0 tr td p class foot copy TLA Consulting Pty Ltd. p p class foot Please see our a href legal information page a p td tr table body html This approach gives you a consistent looking Web site very easily and you can make a new page in the same style by typing something like require Here is the content for this page require Most importantly even after we have created many pages using this header and footer it is easy to change the header and footer files. Whether you are making a minor text change or completely redesigning the look of the site you only need to make the change once. We do not need to separately alter every page in the site because each .
đang nạp các trang xem trước