如何在我的网站上进行导航? [英] How do I do Navigation on my site?

查看:81
本文介绍了如何在我的网站上进行导航?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站目前使用iframe进行导航,因此我可以轻松添加一个链接,而不是每个页面。


有更简单的方法吗?我不喜欢它与i框架的外观


这样的网站如何进行导航?


请体谅,我是一个初学者。

My site currently uses an iframe for navigation so I can easily add a link too one page, rather then every page.

Is there an easier way to do this? I dont like how it looks with an i frame

How do sites like this one do their navigation?

Please be considerate, i am a beginner.

推荐答案

你在谈论顶部的蓝色导航栏吗?这是无序列表(ul)和一些CSS规则的组合。
Are you talking about the blue navigation bar at the top? That''s a combination of an unordered list (ul) and some CSS rules.


从我正在阅读的内容中,您想要一种方法将公共导航设备插入到每个页面中。您的网站,无需在每次更新导航时在每个页面上重新编辑它。


有几种方法 - 您可以使用服务器端方法包括"导航到每个页面的代码中的代码。您将导航元素设置为单独的文件,而不是告诉单个文件在此处包含导航元素。这意味着您只需更新导航文件,其余的就会跟进。


此类解决方案的具体方法取决于您的网站主机 - 您可以使用PHP,ASP,或服务器端包含(SSI),如果您的主机支持它们。 (还有其他服务器端脚本语言可以让你这样做,但这些是最常见和最简单的三种。)找出你的主机允许的内容,然后只需寻找关于包括的教程。使用该语言的文件。


Dreamweaver(也许还有其他HTML编辑器,虽然我不知道任何副手)但是能够使用模板创建一个网站并且文库QUOT; items,允许从中心点管理的常量元素。与服务器端包含(如上所述)不同,模板引擎在您上传它们之前将模板化页面编译为最终的纯HTML格式。好处是您不需要Web主机上的PHP / ASP / SSI功能,但它确实意味着您在进行更改时必须重新上传所有HTML文件。


我想到了另一个想法...它有点像hacky,但如果你有一个可以在多个文件上查找和替换的程序,你可以捏造最后一个方法。使您网站的原始副本在导航代码所在的位置具有类似### MYNAVHERE ###的内容,在准备上传时制作副本,然后搜索### MYNAVHERE ###和将其替换为复制文件中导航栏的代码。同样,这可能是最后的解决方案,并且可能不仅仅是简单地进行编辑。
From what I''m reading, you want a way to insert a common navigation device into every page of your site, without having to re-edit it on every page every time you update the navigation.

There are a couple ways-- you can use a server-side method to "include" the code of the navigation into the code of each individual page. You make your navigation elements as a separate file, than tell the individual files to "include the navigation elements here". This means you can just update the nav file and the rest would follow suit.

The specific method for this sort of solution depends upon your web host-- you could use PHP, ASP, or Server-side Includes (SSI) if your host supports them. (There are other server-side scripting languages that will let you do this, but these are the three most common and simple to work with.) Find out what your host allows, then just look for a tutorial on "including" files in that language.

Dreamweaver (and perhaps other HTML editors as well, although I don''t know of any offhand) has the ability to create a site using templates and "library" items, which allow constant elements that can be managed from a central point. Unlike a server-side include (as detailed above), the template engine compiles your templated pages into their final, plain-HTML format on your computer before you upload them. The upside is that you don''t need the PHP/ASP/SSI feature on the web host, but it does mean you have to re-upload all the HTML files when you make a change.

Another idea came to mind... It''s kind of hacky, but you could fudge the last method if you had a program that could do find-and-replace on multiple files. Make the original copy of your site have something like ###MYNAVHERE### in the place where the navigation code would go, make a copy when you''re ready to upload, then search for ###MYNAVHERE### and replace it with the code for the navigation bar in your copied files. Again, this is probably a last-resort sort of solution, and is probably less work than just putting up with the edits.


还有另一个选项,你可以创建一个包含一个的网站HTML页面。然后,您可以使用CSS来显示或隐藏您网站的各个部分,具体取决于用户在网站中的位置。


我已在此发布了帖子:
http://whitelabelapps.blogspot.com/2。 ..snatching.html


如果没有看到您的网站,就很难说这是否合适。你可以发布一个链接到你的网站吗?
There is another option, you could create a site consiting of one HTML page. You could then use CSS to show or hide various parts of your site depending on where in the site the user finds themselves.

I have posted a post on this at:
http://whitelabelapps.blogspot.com/2...snatching.html

Without seeing your site it would be difficult to say whether this would be suitable. Could you post a link to your site?


这篇关于如何在我的网站上进行导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆