473,322 Members | 1,417 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,322 software developers and data experts.

Repeat a theme or picture on several pages


I have a
<DIV>
....
</DIV>

containing several items such as text and images.
I'd like to repat it on several pages (for instance like repeating a
logo
or a header, etc)

What is the cleanest and most maintenable way to do that. Can i place
it
in a separate html file and link it to any file where it must appear ?

Can I specify a specific top -left position for each page where it
appears?

-P

Dec 8 '06 #1
8 1650
wrote:
What is the cleanest and most maintenable way to do that. Can i
place it
in a separate html file and link it to any file where it must
appear ?
Google for Server Side Includes (SSI), or ASP Include Files. You can
create a small html file, which is basically a snippet of reusable
code, which can be referenced in another html file. If you want to
position it differently on various pages, you should set an id on the
include file's container, and then style it in the header of the master
page.

I've not tried it on Apache myself, but I did read once that your
htaccess file might need to be set-up to enable SSI, assuming you use
the default extension of shtml. Hopefully, someone will correct me if
I'm wrong.

--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
Dec 8 '06 #2
Hi,

I am looking for something that works without a IIS server. Possibly,
pure CSS/HTML.

Must be also usable by a user in disconnected mode on his local
computer (like a sort
of manual or book).

I have the impression your suggestion relies on and ASP server. Am I
wrong?

-P

K A Nuttall ha scritto:
wrote:
What is the cleanest and most maintenable way to do that. Can i
place it
in a separate html file and link it to any file where it must
appear ?

Google for Server Side Includes (SSI), or ASP Include Files. You can
create a small html file, which is basically a snippet of reusable
code, which can be referenced in another html file. If you want to
position it differently on various pages, you should set an id on the
include file's container, and then style it in the header of the master
page.

I've not tried it on Apache myself, but I did read once that your
htaccess file might need to be set-up to enable SSI, assuming you use
the default extension of shtml. Hopefully, someone will correct me if
I'm wrong.

--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
Dec 8 '06 #3
wrote:
I am looking for something that works without a IIS server.
Possibly, pure CSS/HTML.

Must be also usable by a user in disconnected mode on his local
computer (like a sort
of manual or book).

I have the impression your suggestion relies on and ASP server. Am
I wrong?
The second suggestion is ASP. SSI is a *nix/Apache thing.

Both technologies are server-side. If you need client-side, then you're
limited to using inline frames (google iframe). This is something I
haven't tried myself, so I'm not sure about its suitability.

--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
Dec 8 '06 #4


K A Nuttall ha scritto:
wrote:
I am looking for something that works without a IIS server.
Possibly, pure CSS/HTML.

Must be also usable by a user in disconnected mode on his local
computer (like a sort
of manual or book).

I have the impression your suggestion relies on and ASP server. Am
I wrong?

The second suggestion is ASP. SSI is a *nix/Apache thing.

Both technologies are server-side. If you need client-side, then you're
limited to using inline frames (google iframe). This is something I
haven't tried myself, so I'm not sure about its suitability.


Thanks,

I tried :

<iframe src="logo.htm" id ="Logo" frameborder="0" >
</iframe>

where:

#Logo
{
top: 20px;
left: 20px;
width: 97%;
height: 280px;
}

this seems to work. I need it to work at least for FF and MSIE.

I had to specify the size to avoid scrollbars.

Does anybody know if there is a way to have the frame automatically fit
the contents and
do not show scrollbars, so that one can change the content at will
without need to change the CSS code ?

-P



>
--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
Dec 8 '06 #5
On 8 Dec 2006 04:14:22 -0800, pa***********@libero.it wrote:
I have a
<DIV>
....
</DIV>

containing several items such as text and images.
I'd like to repat it on several pages (for instance like repeating a
logo or a header, etc)

What is the cleanest and most maintenable way to do that. Can i place
it in a separate html file and link it to any file where it must
appear ?

Can I specify a specific top -left position for each page where it
appears?

-P
--------------------------------------------------------------------------

How about making it an <iframerather than a <divand then putting
the content in a separate html file? If you want the <divfor other
reasons, make it:

<div>
<iframe>
</iframe>
</div>
Regards,
Kent Feiler
www.KentFeiler.com
Dec 8 '06 #6
<pa***********@libero.itwrote:
I have a
<DIV>
...
</DIV>

containing several items such as text and images.
I'd like to repat it on several pages (for instance like repeating a
logo
or a header, etc)
See http://www.htmlhelp.com/faq/html/des...l#include-file
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

Why is "abbreviated" such a long word?
Dec 8 '06 #7
In article
<11*********************@f1g2000cwa.googlegroups.c om>,
pa***********@libero.it wrote:
Hi,

I am looking for something that works without a IIS server. Possibly,
pure CSS/HTML.

Must be also usable by a user in disconnected mode on his local
computer (like a sort
of manual or book).

I have the impression your suggestion relies on and ASP server. Am I
wrong?

-P

K A Nuttall ha scritto:
wrote:
What is the cleanest and most maintenable way to do that. Can i
place it
in a separate html file and link it to any file where it must
appear ?
The easiest way to do what you want off line without a server and
avoid any problems to do with frames is to simply repeat the
markup on all the pages concerned. This does not mean you have to
even copy and paste, let alone type long-hand.

Use a good text editor with a good Search & Replace function and
do all this stuff automatically on masse, on a whole folder
basis. Want more details? Or do you know what I mean?

Please try to bottom post here as it helps a lot in following the
thread on many newsreaders.

--
dorayme
Dec 10 '06 #8

K A Nuttall wrote:
The second suggestion is ASP. SSI is a *nix/Apache thing.
IIS can do SSI too, without using ASP. Pretty much any competent web
server can, usually with identical syntax.

Dec 15 '06 #9

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

Similar topics

0
by: Keith Patrick | last post by:
I'm curious how folks are generally (if at all) centralizing the setting of both MasterPage and Theme of a large group of pages. I have a content viewer app where my initial solution was to just...
1
by: Miguel Dias Moura | last post by:
Hello, I am creating a master page for a web site. All pages created from this master page will use the same theme. However I am not able to add the theme in my master page. Why is that? ...
3
by: Sachin | last post by:
Hi All, I have a Theme folder "Default" which contians some skins, css files etc. I have specified default theme in Web.Config file under pages section. However, theme is not getting applied to...
3
by: dvan | last post by:
I've created a theme Css for my Asp.net 2.0 web application. The web.config Pages Theme key is set to the theme name. Everything seams to work fine except for any page that I want to disable the...
1
by: Joey | last post by:
Hello, I have tried to programmatically set the theme for my master page by putting code in a "Page_PreInit" fuction in the master page's code behind. However, when I set a breakpoint there and...
0
by: vikramp | last post by:
Hi, I am storing theme in web.config using <pages theme="mytheme"/>. I am then using the following code to read it from my webpage: Configuration config =...
0
by: Jeff | last post by:
ASP.NET 2.0 I have problem with the markup and skin file below, this table isn't displayed. webpage <asp:Table ID="compose" SkinID="compose" runat="server"> <asp:TableRow> <asp:TableCell...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
1
by: cccc2046 | last post by:
hi, i am a rookies in ASP.Net(C#). and i am using visual studio 2005 i am creating a webpages.and using CSS, Master page, and Content page in my CSS ( myStyle.css) i set my background picture...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.