为什么UL反向缩进在firefox,chrome等中,但在IE中却没有? [英] Why is UL reverse indenting in firefox, chrome, etc, but not in IE?

查看:77
本文介绍了为什么UL反向缩进在firefox,chrome等中,但在IE中却没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站:

http:// www。 bradleyalanhart.com/index2.html


上下文:当你开始在Firefox中打开flipmenu导航时,链接打开一个反向缩进层叠左边(中间)的页面。奇怪的是,这就是我想要的。当您在Internet Explorer中打开它时,它会将自身显示为常规的无序列表。


ul / li样式值已在bahart2.css和flipmenu.js中设置,两者都是可以从页面源访问。


问题:我相信,互联网资源管理器正在包装我最长的一行(在SCULPTURE> Forms revisited ......)所以它可以显示正确 - 如果我将nowrap添加到它,而不是像其他浏览器那样反转,它会给我一个水平滚动条。


那么,我怎样才能在IE中重新创建这种行为而不会勉强如何它看起来像标准的broswers?是否有一种简单的方法可以阻止它包装或完全是其他问题?


编辑:好的,添加白色空间:nowrap阻止它包装,但不是反向-indenting它引起水平滚动* headdesk *我真的不喜欢按钮IE。任何帮助都会被爱。编辑早期的帖子以反映变化。

The site:

http://www.bradleyalanhart.com/index2.html

The context: When you start opening the flipmenu navigation in Firefox, the links open in a reverse indent cascading towrds the left (middle) of the page. Which, weirdly enough, is what I want. When you open it in Internet Explorer, it displays itself as a regular unordered list would.

ul/li style values have been set in both bahart2.css and flipmenu.js, both of which can be accessed from the page source.

The problem: I believe, lies in the fact that internet explorer is wrapping my longest line (under SCULPTURE > Forms revisited...) so it can display "properly" - and if I add the nowrap to it, instead of reversing like other browsers do it gives me a horizontal scrollbar.

So, how can I recreate this behavior in IE without fudging up how it looks in standard broswers? Is there a simple way to stop it from wrapping or is the issue something else entirely?

Okay, adding the white-space:nowrap stops it from wrapping, but instead of reverse-indenting it it induces horizontal scrolling *headdesk* I really dislike button IE. Any help would be LOVED. Earlier post edited to reflect changes.

推荐答案

嗨爱丽丝,


首先关闭;在flipmenu.js第57行:margin_right - 我想你明白了。


在查看IE8并打开开发人员程序(F12)时,我看到.flipMenu UL的保证金为5px而非负数,与其他相同需要消极的东西。


你为什么要用js来写css,那真的很讨厌..


-B
Hi Elyse,

First off; in flipmenu.js line 57: "margin_right" -I think you get it.

When looking in IE8 and opening the developer program(F12) I see that .flipMenu UL has a margin of 5px and not negative, same with the other stuff that needs to be negative.

And why the hell are you using js to write css, thats really nasty..

-B


我不在我的开发计算机上,所以我不能看,但IE使用保证金列表,而FF使用填充。 (或者是另一种方式?)


顺便说一下,您使用的是过渡性doctype。新网页应该始终使用严格。
I''m not on my dev computer so I can''t look but IE uses margin for list endents while FF uses padding. (or is it the other way?)

btw, you are using the transitional doctype. New web pages should always use strict.


@ Brian Cheung:非常感谢你指出这一点:)我会从那里开始并希望能够解决这个问题。我出于几个原因让javascript写CSS,但主要是我没有时间为导航编写一个完整的脚本,我为这个项目给出了可计费的小时数(同样,javascipt''这不是我的强项所以我使用了最适合我需求的共享软件,而这就是它的来源。当然我可以进去看看这些命令是如何交互并从js中删除这些行并将它们设置在我自己的CSS文件中,但这需要额外的时间,而不是客户的预算而且我我不习惯免费工作,即使这意味着工作,我也不会百分之百满意。一旦我们活着,它就会在我的列表中排在首位,并且他有预算回来修复,但现在不是优先考虑的事情:(


@ Drhowarddrfine我知道他们处理列表的方式有些麻烦,如果是问题,我将不得不进一步研究它。我*在过渡时编码 - HTML 4.01严格不做支持iFrame,这对网站的设计至关重要。通常我会使用Strict并使用旨在替换iFrame的对象标记,但是当iFrames以新的无缝属性发布时,它将成为HTML 5中的标准,因此当我在Transitional中支持我的iFrame时,为什么我会在Strict中对此页面进行编码?以后会更容易地跳转到HTML 5.0?
@ Brian Cheung: Thanks so much for pointing that out :) I''ll start from there and hopefully work it out. I''m letting the javascript write the CSS for a few reasons, but mainly I didn''t have time to write an entire script for the the navigation myself with the billable hours I was given for this project (also, javascipt''s not my forte) so I used a shareware that best suited my needs, and that''s how it came. Of course I could have gone in and seen how those commands interact and removed those lines from the js and set them in my own CSS file instead, but that would require extra time that isn''t in the client''s budget and I''m not in the habit of working for free, even if it means work I''m not 100% pleased with. It''s at the top of my list of things to correct once we''re live and he has budget to come back and make fixes, but it''s not priority right now :(

@ Drhowarddrfine I knew there was something screwy in the way they handled lists, I''ll have to look further into it if that is the issue. I *am* coding in transitional - HTML 4.01 strict doesn''t support iFrames, which are crucial to the site''s design. Normally I would use Strict and use the object tag that is meant to replace iFrames, but iFrames will be standard in HTML 5 when it is released with the new seamless attribute, so why would I code this page in Strict when my iFrames are supported in Transitional and it will be an easier jump to HTML 5.0 this way later down the line?


这篇关于为什么UL反向缩进在firefox,chrome等中,但在IE中却没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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