At 9:57 PM -0500 6/22/06, Richard Lynch wrote: >On Thu, June 22, 2006 7:23 pm, tedd wrote: >-snip- > >> <body bgcolor="<?php echo $bgcolor?>"> > >> Well... I prefer to separate the header and footer into two files and >> load them as needed in my web page. In addition, I would most >> certainly remove ALL attribute stuff that could/should be controlled >> by css out of html and php and into a css file. > >Putting the stuff into CSS is fine with what I did -- I do that all >the time. I'm not criticizing. You may do whatever is your custom, but the attribute "bgcolor" for the body tag is better served in a css format. The whole point of css is to remove attributes from markup. I realize that people have their own ways that work better for them -- nothing wrong with that. And, if you need (for whatever reason) to change the background color of a body tag programmatically, then your way works for you. But for me, I would move it to embedded css -- that way I know where all attributes are (embedded or in a css file) and don't have to go through my markup trying to find why some presentational element isn't working correctly. > > In between the two <body></body> tags it's pretty simple to manage the >> html and keep track of div's. I never have a header or footer that >> goes beyond the body tags -- so even if there is NO html in between, I >> still have a valid page. > >The header and footer frequently contain the logo, site nav, possibly >a site-wide context-sensitive nav, maybe a mailing list signup, and >then copyright and so on. > >There's no need to be doing a bunch of include files to hit the HD >(expensive) separately for each. The need is in organization. We don't write code in machine language, which would be faster. We write it in whatever language (organization) is our custom, which is expensive. Everything has a price. But, I would guess that the hit to the HD for loading a few extra, but shorter, files would be very minimal as compared to loading one larger file per page. After all, we use includes in php the same way and I don't hear people saying "Don't use includes because of the extra hits to the HD" -- do we? We do it for organization. >It's also all too easy to forget one of the include files on one of >the pages and never even notice it... I've done it too many times when >I went back to add some fluff page to some ancient site. :-( That's the housekeeping I spoke of. We all have different techniques and manners of organization. Mine works for me. If I forget an include, then that page would simply be missing that feature, but the page would still work and validate. >A reasonable amount of the "all the same" stuff in head() handles all >that, and the footer, in one HD seek, with matching tags between >head() and foot() in a single file. > >It's also very easy to call foot() in an error condition to be sure >all tags balance. The tags in my "includes" always balance because I design them that way -- again, that's my organizational manner. The only includes that don't balance are my header and footer includes -- but the header ends, and the footer starts, with a body tag. In short, my organization technique works and I don't have the problems you describe. Cheers, tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php