2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by andanjin
0

I'm not too sure what you on about. But this is what I'm getting.

You would like one menu, to link to all your pages, so that you will not need to edit every individual page to update your menu?

You could use ajax to call your menu from a seperate page, only issue with this solution would be if the user does not have javascript enabled they will not be able to navigate your site. So lets pass on it.

PHP is properly the best way to tackle this. Here is an example


Index.php:

<!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" xml:lang="en" lang="en">
<head>	
</head>
<body>
  <div id="header">
    <?php include('includes/topnav.php'); ?>
  </div>
</body>
</html>

Then we will add the following to "includes" directory
topnav.php

<ul id="nav">
    <li>
        <a href="#">Main</a>
        <ul>
            <li>
                <a target="intro" href="main.html">Main</a>
            </li>
            <li>
                <a target="intro" href="admin.html">Administration</a>
            </li>
        </ul>
    </li>
    <li>
        <a href="@">Buisness</a>
        <ul>
            <li>
                <a target="intro.html" href="business.html">Biz news</a>
            </li>
            <li>
                <a class="daddy" href="#">Business Newspaper</a>
                <ul>
                    <li>
                        <a target="_blank" href="http://www.nytimes.com/pages/business/index.html">NY Times Business</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://online.wsj.com/public/page/news-business-us.html">Wall Street Journal Biz</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.bloomberg.com/?b=0&amp;Intro=intro3">Bloomberg</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.businessweek.com/">BusinessWeek</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.bnet.com/">B-nNet</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.forbes.com/">Forbes</a>
                    </li>
                </ul>
            </li>
            <li>
                <a class="daddy" href="#">Business Media</a>
                <ul>
                    <li>
                        <a target="_blank" href="http://www.pbs.org/nbr/">NBR</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://abcnews.go.com/business">ABC News-Money</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.cbsnews.com/sections/business/main500395.shtml?tag=hdr;cnav">CBS Business</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.cnbc.com/">CNBC</a>
                    </li>
                    <li>
                        <a target="_blank" href="http://www.foxbusiness.com/index.html">FOX-Business</a>
                    </li>
                </ul>
            </li>
        </ul>
    </li>
    <li>
        <a href="#">Education</a>
    </li>
    <li>
        <a href="#">IT</a>
        <ul>
            <li>
                <a target="_self" href="asp.html">ASP</a>
            </li>
            <li>
                <a target="_self" href="html-css.html">(D/X)HTML, CSS, &amp; Color Chart</a>
            </li>
            <li>
                <a target="-self" href="java.html">Java Script</a>
            </li>
            <li>
                <a class="daddy" href="#">MYSQL &amp; XML</a>
            </li>
            <li>
                <a target="_self" href="php.html">PHP,/a&gt;</a>
            </li>
        </ul>
        <a target="_self" href="php.html"></a>
    </li>
</ul>

That should be it, just style id's and classes as necessary

0

i correct according to your instruction
and I need little more your help
If I clcik my menu from menudiv within header, it has to be locate in the main context
where I can scroll.

Do I need to use table, ifram or php
give me detail instruction please


<!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=utf-8" />
<link rel="stylesheet" href="/css/stylesheet.css" />
<style type="text/css">

body{
margin: 0;
padding: 0;
border: 0;
overflow: hidden;
height: 100%;
max-height: 100%;
}

#framecontentTop, #framecontentBottom{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 125px; /*Height of top frame div*/
overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
background-color: navy;
color: white;
}

#sub-left {
float:left;
width:300px;
}
#sub-right {
float:right;
width:240px;
text-align: right;
}

#framecontentBottom{
top: auto;
bottom: 0;
height: 50px; /*Height of bottom frame div*/
overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
background-color: navy;
color: white;
}

#maincontent{
position: fixed;
top: 125px; /*Set top value to HeightOfTopFrameDiv*/
left: 0;
right: 0;
bottom: 50px; /*Set bottom value to HeightOfBottomFrameDiv*/
overflow: auto;
background: #fff;
}

.innertube{
margin: 15px; /*Margins for inner DIV inside each DIV (to provide padding)*/
}

* html body{ /*IE6 hack*/
padding: 125px 0 50px 0; /*Set value to (HeightOfTopFrameDiv 0 HeightOfBottomFrameDiv 0)*/
}

* html #maincontent{ /*IE6 hack*/
height: 100%;
width: 100%;
}

</style>
</head>

<body style="font-family: sans-serif;">


<div id="framecontentTop">
<div class="innertube">
<div id="sub-left">
H-R Infoway
</div>
<div id="sub=right">
Menu bar goes here
</div>
</div>
</div>


<div id="framecontentBottom">
<div class="innertube">

<h3>Copy rigth and other goes here</h3>

</div>
</div>


<div id="maincontent">
<div class="innertube">

<h1>Main Content goes here</h1>

Here is content of the header design example with div or table 1:

<table border="3">
<tr>
<th>Logo sign goes here(div1-topleft): H-R Infoway </th>
<th>projection or screen link(div2-topright) goes here</th>
</tr>
<tr>
<th>Favicon Image(div3-bottomleft) goes here</th>
<th>menu bar(div4-bottomright) goes here</th>
</tr>
</table>
Div 1 to 4 will be located inside of header div
<br>
or
something like this

2nd example looks like this:
<table border ="1">
<tr>
<th>logo image with alt function</th>
<th>Site Name (H-R Intorway)</th>
<th>Menu Link bar goes here</th>
</tr>
</table>


<p> this is my daniweb forum</P>
<br>
<a href="http://www.daniweb.com/forums/post1124844.html#post1124844">andanjin's 2nd forum</a>

</div>
</div>


</body>

</html>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.