关于比记事本更好地跟踪 div 的软件的问题++

发布于 2024-09-02 01:49:46 字数 340 浏览 5 评论 0原文

我最近被聘为一名 Web 开发人员,我正在监督的项目其中一个页面存在格式问题,因为其中一个 div 不正常。这是一个相当复杂的页面,有相当多的 php,从我收集到的信息来看,我在某处缺少 标签,因此一切都搞砸了。

我目前正在使用 notepad++,它在排列 div 方面表现不错,这意味着如果您单击开始的 div 标签,它将突出显示紫色并突出显示结束的 div 标签。但似乎如果您的 div 标签跨越几行(数百行),它就不起作用。

还有其他人遇到过类似的情况吗?我可以使用更好的编辑器来更好地帮助我解决 div 问题吗?或者我是否必须将 div 1 1 排列起来? (大约有100多个)。请告诉我!!谢谢

I recently got hired as a web developer, and the project that I am overseeing has a formatting issue on one of the pages because one of the divs is out of whack. It is a fairly complex page with quite a bit of php, and from what I can gather, I am missing a </div> tag somewhere, and accordingly everything is messed up.

I am currently using notepad++, which is decent at lining up divs, meaning that if you click on the opening div tag, it will highlight purple and also highlight the closing one. But it seems as though if you have div tags that span several lines (hundreds) it won't work.

Has anyone else run into a similar situation? Is there a better editor I could be using that would do a better job of helping me with my div issue? Or do I have to go through and line up the divs 1 by 1? (there are like over 100). Please let me know!! Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

贪了杯 2024-09-09 01:49:46

我建议的另一种途径是通过验证器运行您的页面,例如 http://validator 上的 W3C 服务。 w3.org

HTML Validator 是一个插件Firefox 可以通过本地验证器自动运行您的页面,并通过状态栏中的图标通知您任何问题。

An alternate route I would like to suggest is running your page through a validator, such as the W3C service at http://validator.w3.org

HTML Validator is an addon for Firefox that can automatically run your pages through a local validator and notify you of any issues with an icon in the satus bar.

千里故人稀 2024-09-09 01:49:46

您需要一个能够检测并突出显示标记中的语法错误(以及有效性)的编辑器。有许多。我使用 ActiveState (www.activestate.com) 的 Komodo Edit

You want an editor that detects and highlights syntax errors in markup (as well as validity). There are many. I use Komodo Edit from ActiveState (www.activestate.com)

成熟的代价 2024-09-09 01:49:46

跨平台解决方案是 Eclipse (PDT)。它带有一个漂亮且方便的 html 编辑器。为了快速更改文件和修补程序,我使用 TextMate – 但这仅适用于 OS X :(

A cross platform solution is Eclipse (PDT). It comes with a nice and handy html editor. For quick file changes and hotfixes I use TextMate – but this is OS X only :(

遗心遗梦遗幸福 2024-09-09 01:49:46

有时,当我尝试清理/调试疯狂的 X/HTML 时,我会将其放入 XML 编辑器中,并让它为我执行一些匹配/格式化操作。我个人选择 Altova 的 XMLSpy。它不是免费的(天哪,它甚至不便宜),但我真的很喜欢它的功能。您可以从他们的网站下载免费演示,看看是否对您有帮助。

Sometimes, when I have crazy X/HTML that I am trying to clean up/debug I put it into an XML editor and let it do some of the matching/formatting for me. My personal choice is Altova's XMLSpy. It is not free (hell, it's not even cheap), but I really like the power it has. You can download a free demo from their website and see if it helps you out.

仅一夜美梦 2024-09-09 01:49:46

就像其他人所说的那样,使用像 Eclipse 这样的免费编辑器。在 Eclipse 中打开 HTML,然后按 CTRL+SHIFT+F,它将格式化并缩进代码,就像 Notepad++ 所做的那样。

Like what others have said, use a free editor like Eclipse. Open your HTML in Eclipse, then press CTRL+SHIFT+F and it will format and indent the code, just like what Notepad++ does.

[旋木] 2024-09-09 01:49:46

此页面已在公共区域上线吗?
如果是,您是否尝试使用 W3C 验证器 http://validator.w3.org/,它可能会告诉您闭合 DIV 标记丢失的确切行。

更新:您还可以将页面的代码直接复制并粘贴到验证器中并验证它:您在页面上使用浏览器,然后从浏览器菜单中选择“查看源代码”,然后复制并验证它。将代码粘贴到 W3C 验证器中。

Is this page already online in public area?
If yes, did you try to validate the HTML/XHTML with W3C validator http://validator.w3.org/, it might tell you the exact line where the closed DIV tag is missing.

UPDATE: you can also copy and paste code of the page deirectly into the validator and validate it: you go with your browser at the page, then you select "View Source" from the browser manu, than you copy & paste code into W3C validator.

谁人与我共长歌 2024-09-09 01:49:46

您可以尝试使用更“强大”的编辑器,例如 Eclipse 或 Netbeans。我的大部分 HTML/PHP 开发都使用 Netbeans,它在突出显示匹配标签方面做得很好。

You could try using a more "Powerful" editor such as Eclipse or Netbeans. I use Netbeans for most of my HTML / PHP development, and it does a good job of highlighting matching tags.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文