I would like each page on my site to have the same content in a "frame" to the right, such as a few internal links and a couple of ads.
I don't want to use a real Frame, rather import a piece of html from a separate file, I guess.
What's the smartest way to accomplish this, according to the experts?
Insert text on each pageHow does each page gets a menu to the right?
Page 1 of 1
11 Replies - 1344 Views - Last Post: 22 October 2008 - 06:35 PM
Replies To: Insert text on each page
#2
Re: Insert text on each page
Posted 08 October 2008 - 09:58 AM
put the text in a div and then postion it with your CSS file.
If you use one CSS file for the whole site you just have to place that div on each page and the css will postion it
If you use one CSS file for the whole site you just have to place that div on each page and the css will postion it
#3
Re: Insert text on each page
Posted 08 October 2008 - 10:03 AM
Thanks but I don't wish to put it on every page, that's the point.
Or, wait... you mean I just put the div on the pages, and then keep the text in the common css file?
That sounds like a smart solution. Is that what you mean?
Or, wait... you mean I just put the div on the pages, and then keep the text in the common css file?
That sounds like a smart solution. Is that what you mean?
#4
Re: Insert text on each page
Posted 08 October 2008 - 10:17 AM
Kalkyl, on 8 Oct, 2008 - 10:03 AM, said:
Thanks but I don't wish to put it on every page, that's the point.
Or, wait... you mean I just put the div on the pages, and then keep the text in the common css file?
That sounds like a smart solution. Is that what you mean?
Or, wait... you mean I just put the div on the pages, and then keep the text in the common css file?
That sounds like a smart solution. Is that what you mean?
Make a master page, this is what get loaded. This will have all you sections, which you will create with frames. Make sure to name them. Then have your pages load into those areas. And specify which area each link will load into.
Then you won't have to have the code on every page. The only place it'll be evident will the links themselves.
Did you understand that?
This post has been edited by MacAnimeGirl: 08 October 2008 - 10:18 AM
#5
Re: Insert text on each page
Posted 08 October 2008 - 10:35 AM
You could also use a server side language like PHP. This would allow you to write a function which returns the menu or ad code and insert it with a call to that function and the best part is, no frames.
#6
Re: Insert text on each page
Posted 08 October 2008 - 11:12 AM
No that's not what i meant.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
#7
Re: Insert text on each page
Posted 08 October 2008 - 11:17 AM
I want to re-use the same text on each page without having to update all pages when that text changes. And I don't want frames.
So I guess I'll have to go with the server side script then? I had a feeling this could be done with CSS.
Thanks for your replies, all of you!
So I guess I'll have to go with the server side script then? I had a feeling this could be done with CSS.
Thanks for your replies, all of you!
#8
Re: Insert text on each page
Posted 08 October 2008 - 11:18 AM
jjsaw5, on 8 Oct, 2008 - 02:12 PM, said:
No that's not what i meant.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
I understand what you're saying, but I don't think you're understanding the question.
Quote
I would like each page on my site to have the same content ... import a piece of html from a separate file
It isn't about making it look the same, it's about having the same content on multiple pages without duplicating code, I believe. Like having a menu, header and footer content created from an include instead of copying and pasting.
CSS is for styling code, not for inserting it.
This post has been edited by William_Wilson: 08 October 2008 - 11:19 AM
#9
Re: Insert text on each page
Posted 08 October 2008 - 11:24 AM
William_Wilson, on 8 Oct, 2008 - 01:18 PM, said:
jjsaw5, on 8 Oct, 2008 - 02:12 PM, said:
No that's not what i meant.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
You put the text inside div tags in your html. then you use the CSS to position and style that text where ever and however you like.
I understand what you're saying, but I don't think you're understanding the question.
Quote
I would like each page on my site to have the same content ... import a piece of html from a separate file
It isn't about making it look the same, it's about having the same content on multiple pages without duplicating code, I believe. Like having a menu, header and footer content created from an include instead of copying and pasting.
CSS is for styling code, not for inserting it.
I apologize William, that was not directed at you.
I should have quoted the post i was responding too.
#10
Re: Insert text on each page
Posted 13 October 2008 - 02:05 PM
Okay, I solved it with ASP. That was really smooth. Thanks for the tip.
#11
Re: Insert text on each page
Posted 13 October 2008 - 02:14 PM
If you're using classic ASP just use an Include File, then all the text for your navigation resides in a single file. If you're using ASP.NET use a Master Page
#12
Re: Insert text on each page
Posted 22 October 2008 - 06:35 PM
i would just use a java frame.
its faster for slower internet connections.
this way they dont have to load the same info twice.
its hard to do this using just notepad i would use dreamweaver or a program like it.
hope it helps
its faster for slower internet connections.
this way they dont have to load the same info twice.
its hard to do this using just notepad i would use dreamweaver or a program like it.
hope it helps
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|