Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,613 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 932 people online right now. Registration is fast and FREE... Join Now!




Simple question about page content

 
Reply to this topicStart new topic

Simple question about page content

cygnusX
post 10 Jul, 2008 - 08:11 AM
Post #1


D.I.C Head

**
Joined: 19 May, 2007
Posts: 159


My Contributions


In most websites there is a header and a horizontal menu under the header.When some of the buttons on the horizontal menu is clicked the content below the horizontal menu is changed.That's the case in 99% of the websites.I know it's very simple but i'm new to web developing and don't know how to achieve it.Can someone help me with that with simple examples?I know i can use frames for that but many people said that using of frames is uncommendable.
User is offlineProfile CardPM

Go to the top of the page

BenignDesign
post 10 Jul, 2008 - 09:46 AM
Post #2


Bubble wrapped for your safety.

Group Icon
Joined: 28 Sep, 2007
Posts: 931



Thanked 2 times

Dream Kudos: 150
My Contributions


The practice of using frames in web design is generally frowned upon.

What you are describing - I think - is a header image and a horizontal menu that remains constant at the top of a page regardless of the content below it, correct?

There are 2 basic options for achieving this:
1. Copy and paste your HTML code for the header image and menu on every page of your site.
2. Use PHP to create a header and/or menu include file and include it in every page of your site.

You sound relatively new to the design/development world. As such, I would recommend starting with option #1 above and rather than using frames, give yourself a crash course in CSS and the use of divisions. W3School is a good place to start for an absolute beginner.

Hope that helps!
User is offlineProfile CardPM

Go to the top of the page

cygnusX
post 11 Jul, 2008 - 03:03 AM
Post #3


D.I.C Head

**
Joined: 19 May, 2007
Posts: 159


My Contributions


Yeah,but the content of the pages is not fixed,i'm getting the data from a database.So when i'm opening new page i have to generate the horizontal menu using some scripting language and then to generate the content of the div,that is placed under the menu?
User is offlineProfile CardPM

Go to the top of the page

BenignDesign
post 11 Jul, 2008 - 09:35 AM
Post #4


Bubble wrapped for your safety.

Group Icon
Joined: 28 Sep, 2007
Posts: 931



Thanked 2 times

Dream Kudos: 150
My Contributions


Ok. My freelance site is at http://benign-design.net. At the top, there is an image and a drop-down menu that stays constant on top of every page. Is this what you are trying to accomplish?
User is offlineProfile CardPM

Go to the top of the page

cygnusX
post 11 Jul, 2008 - 10:14 AM
Post #5


D.I.C Head

**
Joined: 19 May, 2007
Posts: 159


My Contributions


QUOTE(BenignDesign @ 11 Jul, 2008 - 10:35 AM) *

...At the top, there is an image and a drop-down menu that stays constant on top of every page. Is this what you are trying to accomplish?


Exactly.
User is offlineProfile CardPM

Go to the top of the page

BenignDesign
post 11 Jul, 2008 - 10:47 AM
Post #6


Bubble wrapped for your safety.

Group Icon
Joined: 28 Sep, 2007
Posts: 931



Thanked 2 times

Dream Kudos: 150
My Contributions


That is accomplished by copying the heading and menu code to every page... ie:

CODE


<html>
<head></head>
<body>
<div id="header"></div>
<div id="menu"></div>

*****Page content*****

</body>
</html>



The page content isn't really related to the header image and menu. The content can change whether static or dynamic without having to change the heading and menu code. It's literally just copied and pasted from one HTML file to another.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 02:44AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month