FIND THE ANSWERS

How to have the same div tag on multiple web pages?

Answer this question

  • How to have the same div tag on multiple web pages?


Answers

Answer #1 | 24/12 2013 13:07
I just want to say that the first method Chris provided is your best bet for maintaining your code for re-usability. @mnmboy Sorry but Server side code is the best way to maintain or manage your html code. No decent website uses plain HTML and CSS anymore. Plus the performance hit is so small you wouldn't even notice it. There is a balance between site performance and man hours for maintenance and not using a server side language for performance is just not a good enough argument. I guess I should answer this question since I have written this much. Lets say you want to have a navigation menu at the top of every page. If you had to add a link to the menu you would have to change every single HTML file. In PHP you would have to just change one file (lets call it navigation.php) and reference that file in every page. This makes things extremely easy for someone to maintain a site, especially if it has tons of pages. Here is a quick code example of what I am talking about: navigation.php
  • link 1
  • link2
  • ...more links
==================================== page.php
some content
======================================= So for every page you create you just add that one line of php to every page to display the navigation html. When you need to add a link to the menu just edit the navigation.php file and all pages referencing it will show the updated menu. Easy as pie. Server side coding can be a bit of a process when first diving into it so here is an introductory tutorial for you to go by if you need to learn it. http://www.webmonkey.com/2010/02/php_tutorial_for_begin ners/
Positive: 59 %

Possible answer

> Work with div tags. Work with div tags. ... A div tag is a tag that defines logical divisions within the content of a web page. ... to create web pages, ...
Read more
Positive: 59 %
transfering multiple div between php pages. 0. ... to refresh a DIV tag on the same page ... web site using a inex.php file. I have setup a login ...
Read more
Positive: 54 %
Division Tag and CSS The Code. The division tag:
Read more
Positive: 40 %
You can do these same things ... HTML Definition of the DIV Tag: In order to use the DIV element you need to know the HTML ... Testing Your Web Pages ...
Read more
Positive: 17 %

Show more results

Anonymous53680
Login to your account
Create new account