/    Sign up×
Community /Pin to ProfileBookmark

Repeat sections of html in css object

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

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@sticks464Jan 28.2007 — The best way is to use SSI (Server Side Includes). Read http://www.smartwebby.com/web_site_design/server_side_includes.asp
Copy linkTweet thisAlerts:
@turboskipperauthorJan 28.2007 — 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.
Copy linkTweet thisAlerts:
@sticks464Jan 28.2007 — You can use virtual or file, whats the difference?[/QUOTE]
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.[/QUOTE]
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
Copy linkTweet thisAlerts:
@ray326Jan 28.2007 — Virtual takes a URL reference, file takes a file system reference. And I'd just install Apache unless you need the MySQL and PHP.
Copy linkTweet thisAlerts:
@CharlesJan 28.2007 — 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 .
×

Success!

Help @turboskipper spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...