View Full Version : html variable ?
n1ckn4me
04-15-2005, 07:21 AM
Hi all!
With php you can create for example a "header" and stick that as a variable on every page you create...so that if you want to modify something in the "header" it automatically updates all the pages that has the variable.
Is this also possible with html/css ? or do I need to use frames for this kind of thing ? or is frames a bad option ? any suggestions ?
thanks in advanced! :)
chilipie
04-15-2005, 07:25 AM
No, HTML and CSS are for structure/content and presentation, not for scripting. You would have to use frames (HTML only), but I wouldn't recommend it, as frames are bad for: SEO, accessibility, text-only browsers, screen readers and a lot more (search the forums ;) ).
n1ckn4me
04-15-2005, 06:31 PM
hey..ok thanks man! I guess sites like cnn.com (http://www.cnn.com) have lots of work to do if they want to update there copyrightyear on there footer :o
well thanks for your respond :thumbsup: got a little more smarter now !
bcarl314
04-15-2005, 07:53 PM
Actually, that's not entirely true. If you want to modify the CONTENT of the page, then yes, you'll need some server side script like the php method you mentioned.
If you properly design a site using semantic HTML and CSS, you can easily modify the LAYOUT of the site by just changing the CSS file. For example, moving the naviation from the top to the left might be an option.
n1ckn4me
04-15-2005, 09:12 PM
good point bcarl! ...that got me thinking...
...isn't it possible to call a txt document for the content in your specified area ? if so than one could create a footer for example with CSS and call a txt document with the actually copyright notice ? (that way you could change the copyrightyear, right ?)
if this is stupid that forgive me... im just filosophing and trying to figure out a solution :)
Yes, that's a widly used method.
n1ckn4me
04-15-2005, 11:36 PM
cool! glad to hear a confirmation, back to coding... :rolleyes:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.