Click to See Complete Forum and Search --> : Repeat sections of html in css object
turboskipper
01-27-2007, 10:53 PM
I'm laying out a website and using CSS for the first time. I have a header and then a 3 column layout. The left and right columns will not change from page to page but the center will change based on what the viewer is looking at. Is there a way to have each html page reference the right and left column html from one location? That way as I change the left and right column code I won't have to go through and update every page of the website.
Thanks for the help,
Preston
sticks464
01-27-2007, 11:13 PM
The best way is to use SSI (Server Side Includes). Read http://www.smartwebby.com/web_site_design/server_side_includes.asp
turboskipper
01-28-2007, 12:10 AM
Thanks for the help, that seems to be working. Couple of questions about it...
<!--#include virtual="left_col.html"-->
You can use virtual or file, whats the difference?
I also notice that sometimes in FF after the page loads it scrolls to the bottom. Not sure why and it only seems to happen half of the time. I guess I'll have to watch it more but found it a bit odd.
Is there a way to preview the page using a browser from local files? I can see how things will look in dreamweaver but it would be nice to verify things locally with different browsers before throwing it on the web.
sticks464
01-28-2007, 12:27 AM
You can use virtual or file, whats the difference?
I'm really unsure, I have never used anything except virtual.
Is there a way to preview the page using a browser from local files? I can see how things will look in dreamweaver but it would be nice to verify things locally with different browsers before throwing it on the web.
Only if you install a server on your computer. A good one is WAMP www.wampserver.com/en/ and a tutorial for installation http://quartz.syr.edu/rdlankes/Teaching/LAMP/WAMP/WAMPInstall.html
ray326
01-28-2007, 12:37 AM
Virtual takes a URL reference, file takes a file system reference. And I'd just install Apache unless you need the MySQL and PHP.
Charles
01-28-2007, 04:46 AM
PHP is, however, nice to have.
Include virtual will also include the output from scripts. Include file has been disabled on some systems for security reasons. See http://httpd.apache.org/docs/1.3/mod/mod_include.html .