View Full Version : CSS/XHTML and included files??!!
wakeup
May 9th, 2006, 06:08 AM
mmm probably a stupid Q but im confusing myself
http://www.twenty-eleven.com.fidowebsite/index.html
this is my first non tables standards compliant site and seems to be going OK!?
but, i want to have the nav in a seperate file so can be updated sitewide - have previously used php includes but cant do that here or it wont be valid markup, right??!!
been learning my CSS by mistakes for a few hrs now so forgive me if im just not seeing a simple solution here!!!
cheers all
ditt0
May 9th, 2006, 07:48 AM
so use shtml include
wakeup
May 9th, 2006, 09:42 AM
just tried this - doesnt seem to work?
copied and pasted the html for the nav into a html file called navigation.html then replased it into the index file with <!--#include file="navigation.html" --> and made the index extension to .shtml
any ideas??
cheers
bwh2
May 9th, 2006, 10:13 AM
but, i want to have the nav in a seperate file so can be updated sitewide - have previously used php includes but cant do that here or it wont be valid markup, right??!!
php includes should have no effect on your final xhtml validation if you do it correctly. what kind of differences/problems are you seeing?
wakeup
May 9th, 2006, 07:28 PM
so i can have php includes on php page with the XHTML doctype declaired??
CriTiCeRz
May 9th, 2006, 07:36 PM
Yes you can.
bwh2
May 10th, 2006, 11:14 AM
so i can have php includes on php page with the XHTML doctype declaired??
you should always declare a doctype.
the reason i said php includes should have no effect on your validation is because browsers don't parse the php. browsers parse the html, which is produced by the server running php. from the browser's perspective, php doesn't even exist.
wakeup
May 10th, 2006, 07:37 PM
yes, was thinking that......makes sense. cheers
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.