|
|
Always a good idea
|
|
|
|
|
I've created a seperate html files for navigation, content and footer. I want to club those files. All the navigation, content, footer files resides in the same directory where the index.html file resides. I want to include the above mentioned html files inside the index.html. I have tried using the following in index.html file
<!--#include virtual="topbanner.html" -->
I also tried using the asp code which also fails. I tried with asp by changing all the html file extensions as .asp. Then i tried to place the following asp code in index.asp file as
<!--#include file="topbanner.asp" -->
Kindly solve my problem. This is an urgent thing to do for me.
M.Sworna Vidhya
|
|
|
|
|
Is it a full html file that you're trying to include? If so, this will cause you a problem as you should only try and import the relevant elements, and not the full page. BTW - convention seems to be to use .inc extension for include files.
|
|
|
|
|
The only way I can think to do it outside of something serverside would be to use javascript with a document.write()....maybe this will help http://www.cryer.co.uk/resources/javascript/script4.htm[^]
I would use php to do what you want on the server side of the fence. PHP has a number of related function like include() that I use to seperate my html output into different sections. I do this by making a number of small php files like....
header.php
menu.php
footer.php
these can all contain the basic html output like this example
header.php
-----------
<html>
<head>
<title>My Site</title>
<body>
.....end header.php
AND
menu.php
-------------
<div>
<ul class='menu'>
<li><a href=''>Link 1</a></li>
<li><a href=''>Link 2</a></li>
</ul>
</div>
hope that helps...
AND
footer.php
-------------
</body>
</html>
......end footer.php
NOW you just call these from a page script like this.
index.php
--------------
include('header.php');
include('menu.php');
// start page content....
// end page content....
include('footer.php');
|
|
|
|
|
How does it fail? Does it cause an error?
Have you checked to make sure your server is configured to handle SSI?
I thought that html files had to end with .stm in order to get IIS to parse the includes.
|
|
|
|
|
Hi,
I am wondering if anyone can point me at an example of a CSS layout that I cannot get to work for the life of me, despite reading countless tutorials. (Give me a bit of C++ and I'm usually okay, but I have to admit CSS still feels like a black art to me).
The layout I am wanting is:
- whole layout centred
- 3 colums
- 2 side-columns fixed width, centre column variable (but with a min and max maybe)
- all 3 columns same height regardless of amount of content
I really don't want to resort to tables, but I just can't get this to work with divs and CSS.
Please help!
Best wishes, Patrick
|
|
|
|
|
Can you post your code so we can take a look at it?
|
|
|
|
|
Hi,
Thanks for the reply.
I finally found a layout that seemed to do most of what I wanted, based on something called the 'Skidoo' layout. It's not perfect, but it has given me enough to get started, and at least I (mostly) understand what the hell is going on.
So I don't have my original 'broken' code to post anymore.
Thanks to anyone who has taken the time to read my post though.
Best wishes, Patrick
PS - Something very funny seems to have happened with the threading of my message: it now seems to be embedded in the middle of another discussion, which even appears to contain an advert for an online game.
|
|
|
|
|
I want to learn how to develop websites. I need everybody's help.
|
|
|
|
|
You need to help yourself first. Start with Google[^].
|
|
|
|
|
Lots of samples, tutorials etc on the ASP.NET[^] site.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
I'd start off by buying some decent books on web development then, if I were you.
|
|
|
|
|
I would say there are two main paths to web development. The code path and the visual path. You will need to decide which one is best for you to learn. The code path is a person that likes to understand the languages of the web(HTML, JavaScript, CSS) and how they fit together. The visual designer will focus more on the look and feel, less reading is involved but IMHO, you miss a lot too. But you can still "make webpages" it just means you need a great visual editor so you can draw the website out in whats called a wysiwug(What You See Is What You Get). The editor will make the page code for you, my limited experience is they often add more junk code than I feel is needed, but I am a coder.
If you want to get started with a code path then grab a good text editor. I use notepad++ on windows and bluefish on linux, both are free. You can also look into tswebeditor or crimson editor, again free, but getting a little dated.
You MAY need a webserver if your code start becoming more complex and you add dynamic elements to your projects, but to start you can use the file open in your browser to open any html page on your local machine.
A note of browsers, more is better. Each browser has settled on a hand full of rendering engines. And so a web page will display differently in different browsers. Even the same browser of different version will not be 100% alike, IE6 and IE7 for example. So grab the most stable releases of Internet Explorer, Fire Fox, Google Chrome and if you don't mind paying the money Opera. Any page you make should look almost the same in each and must behave the same. This is very true with scripts and CSS.
Once you have a basic understanding of HTML, CSS and a little javascript. Start looking at the different code for different websites...and visit Eric Meyers website, he is one of the best in using CSS.
If you want to go the visual route I do not have much info to give you. I do know that both Microsoft and Adobe have visual web designers, but have no idea what they are even called now.
No matter which route you go, be prepared to spend a lot of time improving your skills.
All the Best
Chris
|
|
|
|
|
|
AkyeaW wrote: I need everybody's help
That would be a little bit too much, don't you think so? Codeproject has about 7.3 million members, so if everybody would help you, that would be overwhelming.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
I want to know how to change URL visible in browser
visit :
http://www.magiconabudget.com/productdetail/singles/abuna-acolyte/46/1704
http://www.goiit.com/posts/list/organic-chemistry-is-practicing-conversions-enough-to-tackle-1049675.htm
These both are programming pages but one is not showing file extension
and other is showing programming pages at HTML page
How to do that. Please guide
Thanks
|
|
|
|
|
Here's[^] an easy way to do it in IIS7.
|
|
|
|
|
|
|
PHP is not a web server, it's a programming language. If your PHP is running on IIS, you can use the link I showed you before. If it's running on APACHE, use mod_rewrite[^].
|
|
|
|
|
Hello dear reader.
I have the follwoing problem. Please be aware I'm almost a beginner with html
I'm creating a html-page with a "navigation-pane" at the left side and a "content-pane" at the right side in the html-page. Creation is done via some xsl-transformation from some xml-files.
Now I found, that there are basically two ways to do this
a)
Via framesets. This seems to be obsolet somehow - I have read. But on the other side it seems to be easy: Just create all the different html-pages for the content and load it via selection in the navigation-pane.
b)
Via CSS. This is what I want to do. But my problem here is: I do not understand it at all. How can I load different content into the content-pane !?!? Sorry, it seems I can not even ask the right question
Does somebody have any idea ( if you understand what I want to say )?
|
|
|
|
|
What you are trying to do is to have content in a minimum of 2 divs. The first div will be the navigation pane, and the second div will be the content pane. Now, if you're looking to develop css based sites and you haven't got much of a clue how to do it, you really need to check out the tutorials and articles in A List Apart[^] - it seems to be the premiere site for web developers. I'd also check out Eric Meyer's[^] books - he has plenty of samples that should help you (and you can download the source code for nothing from his site).
|
|
|
|
|
hello,
i've had a look at his site, but I didn't find code.
Can you send me a "detailed" link?
Thanks for you help
|
|
|
|
|
How hard did you look? This[^] is a pretty decent example, but you really should start reading around this.
|
|
|
|