473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to specify often-used text just once?

Is it possible to specify in a html document that you want to resue a piece
of text?

For instance, I have a navigation bar with links. This navigation bar will
be used on all the webpages. AFAIK, this can only be done by putting the
navigation bar itself in all the html douments. So as soon as something
changes in the navigation bar, you need to fix this in all your pages. Also,
this is for static text, no scripts, no server support.

With CSS is is possible to do thinks that look a bit like this, you can
reuse background images. I am looking for something like this, but then for
foregound text.

It looks like it's not possible, but I could have overlooked something.

--
Sander van der Wal
www.mBrainSoftware.com
Mar 16 '07 #1
3 1977
Els
Sander van der Wal wrote:
Is it possible to specify in a html document that you want to resue a piece
of text?
[snip]
It looks like it's not possible, but I could have overlooked something.
http://allmyfaqs.net/faq.pl?Include_one_file_in_another

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Mar 16 '07 #2
On 03/16/2007 06:12 AM, Sander van der Wal wrote:
Is it possible to specify in a html document that you want to resue a piece
of text?
[...]
You could use an IFRAME element:
http://www.w3.org/TR/html4/present/frames.html#h-16.5

Mar 16 '07 #3
Sander van der Wal wrote:
Is it possible to specify in a html document that you want to resue a piece
of text?

For instance, I have a navigation bar with links. This navigation bar will
be used on all the webpages. AFAIK, this can only be done by putting the
navigation bar itself in all the html douments. So as soon as something
changes in the navigation bar, you need to fix this in all your pages. Also,
this is for static text, no scripts, no server support.

With CSS is is possible to do thinks that look a bit like this, you can
reuse background images. I am looking for something like this, but then for
foregound text.

It looks like it's not possible, but I could have overlooked something.
Put the complete HTML for the navigation bar in a separate file. While
complete for the navigation bar, this should be an HTML fragment (no
<!Doctype>, <HTML>, <Head>, etc). Do NOT give the file an HTML or
similar extension. Upload the file to your Web server.

Wherever you want the file to appear in an actual HTML file, put the
following:
<!--#include file="xxx" -->
where xxx (with quotes) is the navigation bar fragment file with its
path on your server relative to your Web root. When you upload such a
HTML file to your Web server, you will have to declare the file
executable.

Note that this requires the Web server to have server-side includes
(SSIs) enabled. You may have to work with the technical help staff for
your server's host to put the navigation bar fragment file in the proper
place and then construct the path to the file for the #include.

--
David E. Ross
<http://www.rossde.com/>

Natural foods can be harmful: Look at all the
people who die of natural causes.
Mar 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
I have a page1.asp that opens a window called page2.asp. I want page2.asp doesn't have title bar, tool bar, address bar. Is it possible to specify in javascript function window_onload() in...
1
by: Till Soerensen | last post by:
I would like to validate a xml file against a xsd file on my hard disc. Ok, I could specify the location of the XSD Schema in the instance of the xml file as follows: <Person...
3
by: Fred | last post by:
this is a problem i can't figure out. I can't get IE to link to a new widown with width/height attributes as i can in other browsers. It works in NN, Op, Moz. The code is all on the same line as...
1
by: scooterm | last post by:
### Background In it is possible to specify any special and arbitrary directory (or set of directories) to use as a source for custom, user-designed modules. For example, one can do: ###...
0
by: N.K. | last post by:
Hello, I'm doing automated database dump and want to be able to specify Username and Passowrd in my shell script for pg_dump. When I do man pg_dump there are no options for password. There is...
1
by: MrMike | last post by:
Hi. I have an aspx page which displays data on about the top 1/3 of the page, and the remaining 2/3 of the page is blank. The page is formatted so that my users can print the page to...
0
by: sylvain | last post by:
I create a deployment kit with VS and I want to specify a Web Site different then the Default Web Site. There are two Web Site on our Web Server and they are using the same Port (two different...
0
by: venkatbo | last post by:
Hi folks, On i686 Linux, I would like to place my python modules as: <base_dir>/src/py-modules/*.py and use the cmd from <base_dire>: ...base_dir]$ python src/py-modules/setup.py install...
3
by: thomas | last post by:
How to specify application default web page in web.config? I mean, default web page, not a login page. Is it possible? Tomasz
0
by: Dave Burns | last post by:
Hello, I am trying to specify a logical default value for a in a WCF Web Service using basicHttpBinding. I realize that the language defaults are: int - 0 string - null bool - false
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.