2 replies [Last post]
chipperi
chipperi's picture
Offline
newbie
Last seen: 8 years 7 weeks ago
Timezone: GMT-4
Joined: 2014-05-13
Posts: 2
Points: 3

I am a graphics guy not a website guy. Therefore I need help!! Short version= I want to be able to add buttons to my nav bars from one page instead of every single page...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="main.css" />
<title> MutzGraphix.com  </title>
</head>
 
<body>
<div id="topbar"><img src="images/doggy.gif" width="100" height="100" />MutzGraphix.com<img src="images/doggy.gif" width="100" height="100" /> <br> 
    <a href="http://jigsaw.w3.org/css-validator/check/referer"> </a></div>
 
<div id="lside"><div id='cssmenu'>
<ul>
   <li class='active'><a href='index.php'><span>Home</span></a></li>
   <li><a href='services.php'><span>Services</span></a></li>
   <li><a href='about.php'><span>About</span></a></li>
   <li class='last'><a href='contact.php'><span>Contact</span></a></li>
</ul>
 
<div id='salemenu'>
 
Buy our decals here!<p>
Catagories:
<ul>
   <li class='active'><a href='funny.php'><span>Funny</span></a></li>
   <li><a href='guns.php'><span>Guns 2A</span></a></li>
   <li><a href='religious.php'><span>Religous</span></a></li>
   <li class='last'><a href='off.php'><span>Off Color</span></a></li>
</ul>
</div></div></div>
 
<div id="rside"></div>
 
<div id="middle"> MutzGraphix is in the process of being built. 
</div>
 
</body>
</html>

/* CSS Document */
 
body
{
background-image:url(images/g3sf25.gif)
}
 
#topbar
{
    position:absolute;
	margin:0px;
	top:2px;
	height:100px;
	width:1096px;
	text-align:center;
	font-size:50px;
	font-family:"Showcard Gothic";
	color:red;
	z-index:1;
	left: 126px;
}
 
 
#lside
{
	margin:0px;
	position:absolute;
	top:0px;
	left:0px;
	width:125px;
	height:1500px;
	z-index:-1;
}
 
/* NAVBAR */
 
#cssmenu {
  position:absolute;
  top:200px;
  width: 125px;
  border-style: solid solid none solid;
  border-color: #D76100;
  border-size: 1px;
  border-width: 1px;
  padding: 0px;
  text-align:center;
  font-size:12px;
	font-family:"Showcard Gothic";
	color:red;
}
#cssmenu ul {
  margin: 0px;
  padding: 0px;
  list-style: none;
}
#cssmenu li a {
  height: 32px;
  height: 24px;
  text-decoration: none;
  font-weight: normal;
  color: #9E3C02;
  display: block;
  background: url(images/menu4.gif);
  padding: 8px 0 0 30px;
}
#cssmenu li a:hover {
  color: #fff;
  background: url(images/menu4.gif) 0 -32px;
  padding: 8px 0 0 30px;
}
#cssmenu li a:active {
  color: #fff;
  background:url(images/menu4.gif) 0 -60px;
  padding: 8px 0 0 30px;
}
/* END NAVBAR */
 
/* saleBAR */
 
#salemenu {
  position:absolute;
  top:150px;
  width: 125px;
  border-style: solid solid none solid;
  border-color: #D76100;
  border-size: 1px;
  border-width: 1px;
  padding: 0px;
  text-align:center;
	font-size:12px;
	font-family:"Showcard Gothic";
	color:red;
}
#salemenu ul {
  margin: 0px;
  padding: 0px;
  list-style: none;
}
#salemenu li a {
  height: 32px;
  height: 24px;
  text-decoration: none;
  font-weight: normal;
  color: #9E3C02;
  display: block;
  background: url(images/menu4.gif);
  padding: 8px 0 0 30px;
}
#salemenu li a:hover {
  color: #fff;
  background: url(images/menu4.gif) 0 -32px;
  padding: 8px 0 0 30px;
}
#salemenu li a:active {
  color: #fff;
  background:url(images/menu4.gif) 0 -60px;
  padding: 8px 0 0 30px;
}
/* END saleBAR */
 
#rside
{
	margin:0px;
	position:absolute;
	top:0px;
	right:0px;
	width:125px;
	height:1500px;
	z-index:-1;
}
 
#middle
{
	float:left;
	margin:0px;
	position:absolute;
	top:125px;
	right:200px;
	left:200px;
	text-align:center;
	font-family:"Showcard Gothic";
	font-size:25px;
	color:red;
}

chipperi
chipperi's picture
Offline
newbie
Last seen: 8 years 7 weeks ago
Timezone: GMT-4
Joined: 2014-05-13
Posts: 2
Points: 3

Oh and if you care to see my

Oh and if you care to see my disaster of a site www.mutzgraphix.com

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 17 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

There are a variety of

There are a variety of methods for doing this. The catch-all phrases for your search include "server side includes", "PHP includes", "[your server scripting language] includes", etc.

Which method you use will depend on your preference and on server, OS and language capabilities.

Your response header indicates you could use php include and Apache's server-side include methods.

See Apache Tutorial: Introduction to Server Side Includes and the php include function.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.