IE7 在使用 jquery/jquery UI 和 <a onclick= "show();hide2();hide3;" > 时改变了我的风格



我让我的代码按照我想要的方式工作,在IE9,Chrome,ff,Safari,Opera中完美工作,但是当我尝试IE7时(我正在开发用于使用的公司这在他们的系统上)这会导致我的内容div向上移动页面,从而缩小标题和内容之间的差距。我想知道它是否与我的内联样式有关,例如

<div id="lang" style="height:200px">

这是我的代码

javascript

    function hide(){
      $('#lang').hide(500);
}
function show(){
      $('#lang').show("blind", 500);
}
function hide2(){
      $('#aud').hide(500);
}
function show2(){
      $('#aud').show("blind", 500);
}
function hide3(){
      $('#rep').hide(500);
}
function show3(){
      $('#rep').show("blind", 500);
}

html

                    <h3 class="red">
                    <a onclick="show();hide2();hide3();"><u>Language</u></a> - 
                    <a onclick="hide();show2();hide3();"><u>Audience</u></a> - 
                    <a onclick="hide();hide2();show3();"><u>Representation</u></a>
                </h3>
                    <div id="field" style="height:450px">
                        <div id="lang" class="pad" style="height:440px">
                            <h3>
                                Language
                            </h3>
                            <img src="images/language.jpg" alt="language" align="left" class="im" />
                            <p>Each form of media has its own language that we become familiar with and learn to decode
                            in order to understand the text. In print texts such as newspapers we know that words in a variety
                            of formats construct much of the meaning of this type of media. These include the masthead, headlines,
                            body text and captions. Similarly, magazines will use the printed word in much the same way
                            but mags tend to make more use of photos and graphics which we also learn to decode. An image of
                            a celebrity on the front cover will probably appear as a selection from a studio photo shoot, with suitable
                            lighting, cropping, dress code and there is always the possibility that the image has been photoshopped.
                            In terms of listening media there are language elements such as music, voice and sound effects.
                            Film or moving image media is decoded through sound, camerawork, mise en scene, cinematography
                            and editing. Our experience with the media gives us a working knowledge of of all of the above
                            but in order to produce our own media artefacts we need to have a deeper understanding of these
                            language components. This enables us to encode text, images, sound and film to present our own ideas
                            in a way that makes meaning for the intended audience.</p>
                        </div>
                        <div id="aud" class="pad" style="display:none;height:425px">
                            <h3>
                                Audience
                            </h3>
                            <p>This concept has to do with the way we identify, construct and address audiences.
                            It also deals with the ways in which audiences consume texts and the meanings and pleasures
                            they derive from texts. Audiences are defined by factors such as nationality and age. They may also
                            <img src="images/audience.jpg" alt="audince" align="right" class="im" />
                            be understood in terms of the categorisation of social groups. An audience may be an individual, a
                            family unit or a social group in a pub. Texts are encoded to appeal to audiences in specific ways - think
                            of the appeals offered by the range of characters in a soap such as Eastenders or the attractions of
                            the Olympics to a global audience. Any text can be read differently by different audiences. They may
                            approve or disapprove of the humiliation of contestants on The X Factor. The pleasures of the same
                            text may be completely different for different consumers of the text. Think of a programme that divides
                            opinion in your home.</p>
                        </div>

                        <div id="rep" class="pad" style="display:none;height:360px">
                            <h3>
                                Representation
                            </h3>
                            <p>This is central to our understanding of the media. The media do not present the
                            <img src="images/steriotypes.jpg" align="left" alt="steriotypes" class="im" />
                            world to us but they do offer a re-presentation of it.The role of the media is to construct a relationship
                            between the real world and our ideas about that world. We may think we have extensive
                            knowledge of a celebrity but that knowledge is filtered through the media so that we understand the
                            mediated version of that person. We may think we know a lot about David Beckham through the media
                            but this is made up of the image of the footballer, the ad figure, the celebrity husband, the sporting
                            representative for the UK and so on. These are all aspects of a highly mediated construct and the extent
                            to which we can say we know such a person has to be limited. The concept of representation applies
                            not just to people but to nations, values, issues and our sense of self.</p>
                        </div>
                    </div>

我也使用

<!--[if lt IE 8]>
<![end if]-->

对于我的IE7 stylesheet

我不是一个流利的JavaScript/jQuery开发人员,只能对Nivo Slider/ShadowBox等插件进行一些简单的实现和修改,因此,任何帮助都将不胜感激。

我也忘了提到我正在使用CSS3Pie ...

谢谢,

finbar

处理IE问题总是很棘手的。我要做的是在开始时使用CSS重置,有助于用边距和填充删除所有这些问题。如果您还没有,则可以尝试该方法。

还说内容div时,您是否可以准确地指定您的含义(如html代码中的哪一部分)

最新更新