Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic CSS question (I think) 1

Status
Not open for further replies.

Jakobud

Technical User
Mar 9, 2001
51
US
Every single CSS tutorial I look at just talks about how to change the appearence of your entire website using linked style sheets. Adjusting text and link decoration and colors etc...

But what I can't seem to find is how to control the overall layout of all the pages on your website using a single template html file. I think this is a CSS related answer...not sure.

Anyways, here's an example:


Every single page that you goto on that site has some sort of common layout across the top of the browser. At the top bar, it lists these things:

GameBoy Advance
GameCube
PC
Playstation2
XBox

Then it has some sort of pulldown menu. Lets say that the webmaster wanted to add something to that list of consoles up there. Lets say he wanted to add in the "Playstation 3" up there. He obviously would go to every single webpage on the sight and add this (there are hundreds of pages with this common navigation bar across the top). Isn't there someway to do this using CSS or something like that?

Like I said, I think this is probably an easy thing to answer because hundreds of sites do this, but I just couldn't really figure out what question to search for on google...so I figured I'd ask you all :)

Any help will be appreciated.
 
Opps I made a typo. Near the end when I was talking about the Gamefaqs webmaster adding "Playstation 3" to the navigation bar, I meant to say "He obviously would NOT go to every single webpage..."

Jakobud
 
well if your server has SSI you could use an include

<!-- #include virtual=&quot;file.htm&quot; --!>

with php

<? include (&quot;file.htm&quot;); ?> [Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Hi,
there's two things to look at here, firstly layout and secondly content.

If you build your site template using CSS then the entire site can be easily modified by editing the CSS file. All the content is contained in blocks (divs). With CSS all you need to do is move these blocks, change their shape, position, colour etc and you have a new site design,

But as for content it's different. In this case deecee rightly pointed out that this is (probably) down to using some sort of includes. Server Side Includes are very common and very easy! The content is contained in one file and included into any other file that you want. You can tyhen edit that single file and the change is reflected throughout the site or wherever you included that file. But that is only the tip of the iceberg, there's a lot more you can do with SSI.
Same also with PHP, you can include files but there's a lot more to it than simple includes.

Most websites have a template system. With SSI the site is normally broken up into sections, each contained in a separate file and pulled together to make the pages.
With PHP or other such lamguages this process can be expanded. PHP has &quot;template systems&quot; (thats what I call them anyway) which make this process a lot easier (if u know php)

If you're just beginning then i'd recommend start with SSI, the basics are simple and it's fun.


É ::
 
Good post cian, a star for you. I can only echo what you said. It's easy to confuse a &quot;content template&quot; with a &quot;layout template&quot;. A CSS file is a layout/presentation template. Your content template is a server-specific technology, like SSI etc.

petey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top