5 Replies - 648 Views - Last Post: 11 July 2008 - 11:47 AM

#1 cygnusX  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 159
  • Joined: 19-May 07

Simple question about page content

Posted 10 July 2008 - 09:11 AM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Simple question about page content

#2 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6167
  • View blog
  • Posts: 10,650
  • Joined: 28-September 07

Re: Simple question about page content

Posted 10 July 2008 - 10:46 AM

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!
Was This Post Helpful? 0
  • +
  • -

#3 cygnusX  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 159
  • Joined: 19-May 07

Re: Simple question about page content

Posted 11 July 2008 - 04:03 AM

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?
Was This Post Helpful? 0
  • +
  • -

#4 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6167
  • View blog
  • Posts: 10,650
  • Joined: 28-September 07

Re: Simple question about page content

Posted 11 July 2008 - 10:35 AM

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?
Was This Post Helpful? 0
  • +
  • -

#5 cygnusX  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 159
  • Joined: 19-May 07

Re: Simple question about page content

Posted 11 July 2008 - 11:14 AM

View PostBenignDesign, on 11 Jul, 2008 - 10:35 AM, said:

...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.
Was This Post Helpful? 0
  • +
  • -

#6 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6167
  • View blog
  • Posts: 10,650
  • Joined: 28-September 07

Re: Simple question about page content

Posted 11 July 2008 - 11:47 AM

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


<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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1