首页 \ 问答 \ 为什么Internet Explorer显示此网站与Firefox或Chrome相比居中?(Why does Internet Explorer show this site centered versus Firefox or Chrome?)

为什么Internet Explorer显示此网站与Firefox或Chrome相比居中?(Why does Internet Explorer show this site centered versus Firefox or Chrome?)

我建立了一个网站,当我的用户加载时

http://info.salemgolfclub.org/Account/Logon

用户名和密码用户输入控件在Firefox和Chrome的面板中显示左对齐, 但Internet Explorer在面板中显示它们

我希望Internet Explorer也显示左对齐。 我如何确定Firefox和Chrome似乎弄清楚了什么但是Internet Explorer难以理解,因此每个浏览器都是一致的?

对于这个特定的例子以及对未来避免这种情况的最佳做法的一般性评论,我将不胜感激。


I have built a website and when my users load up

http://info.salemgolfclub.org/Account/Logon

the username and password user entry controls show left justified in the panel in Firefox and Chrome but Internet Explorer shows them centered in the panel.

I want Internet Explorer to show left justified as well. How do I determine what Firefox and Chrome seem to figure out but Internet Explorer struggles with so every browser is consistent?

I would appreciate comments both on this particular example as well as general comments on best practices to avoid this type of situation in the future.


原文:https://stackoverflow.com/questions/1251435
更新时间:2023-01-09 17:01

最满意答案

如果我从您的评论中正确理解,您可以通过Drupal 6的Image模块的Image Attach子模块将图像附加到节点。

此子模块的工作方式是将图像附加到节点时,它首先为该图像创建一个新节点,然后将该新节点附加到原始节点。 类似于“现代”实体引用在Drupal 7和8中的工作方式。

您可以通过转到admin/content/node概述确认附加图像创建新节点,并在列表中看到类型image的新节点。

检索该节点信息的最简单方法是从当前node对象的信息中获取它:

$paths = $node->image_attach[0]->images

这将检索一组文件路径到各种版本的图像。 例如:

$original_path = $node->image_attach[0]->images['_original']

将链接到您原始的,未改变的图像,而:

$thumbnail_path = $node->image_attach[0]->images['thumbnail']

将链接到其缩略图版本(如果存在)。

您可能知道,Image Attach子模块允许您向节点添加多个图像。 在我的例子中,我通过使用[0]盲目地拍摄了第一张图像。 如果你有多个图像,当然应该循环遍历image_attach数组中的各个条目。

如果您希望检索有关连接到原始节点的每个图像节点的更多信息,您还可以加载实际节点本身并使用它:

$nid = $node->image_attach[0]->nid;
$image_node = node_load($nid);

在这里,您完全加载引用的节点并提供其所有信息。

然而,后一种情况会导致不必要的开销,因为在完全加载节点时不存在额外的信息。 完整引用已由原始node对象内的Image Attach子模块提供。 只知道Image Attach实际上在水下创建额外的图像节点,你可以这样处理。


If I understand correctly from your comments, you attach an image to a node via the Image Attach submodule of Drupal 6's Image module.

The way this submodule works is when you attach an image to your node, it creates a new node for that image first and attaches that new node to your original node. In a way similar as how "modern" entity references work in Drupal 7 and 8.

You can confirm that attaching an image creates a new node by going to your admin/content/node overview and see a new node of type image appear in the listing.

The simplest way of retrieving the information of that node is by fetching it from the information on the current node object:

$paths = $node->image_attach[0]->images

This will retrieve a set of file paths to the various versions of the image. For example:

$original_path = $node->image_attach[0]->images['_original']

Will link to your original, unaltered image, whereas:

$thumbnail_path = $node->image_attach[0]->images['thumbnail']

Will link to its thumbnail version (if present).

As you might know, the Image Attach submodule allows for you to add multiple images to your node. In my example I have blindly taken the first image present by using [0]. If you have multiple images you should, of course, loop over the various entries present on your image_attach array.

If you wish to retrieve even more information about each image node that got attached to your original node, you could also load the actual node itself and work with that:

$nid = $node->image_attach[0]->nid;
$image_node = node_load($nid);

Here you fully load the referenced node and have all of its info available.

The latter case, however, would cause unnecessary overhead for there is no extra information present when fully loading the node. The full reference is already provided by the Image Attach submodule inside of your original node object. Just know Image Attach actually creates extra image nodes underwater which you can treat as such.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)