search
HomeWeb Front-endHTML TutorialThis is going against heaven. A problem with browser incompatibility_html/css_WEB-ITnose

问题就是在firefox,ie8里页面底部的文字和背景图会灵异的跑到最顶端,在导航条之上。。。实在是想不出为什么。。拜托各位了!!


首先,html代码:是模板页的



    深圳网能达公司
      
      <script></script>
      <script> <br /> $(function(){ <br /> $menuLi = $(".menu>ul>li"); <br /> $menuLi.hover(function() { <br /> $(this).addClass("selected"); <br /> },function(){ <br /> $(this).removeClass("selected"); <br /> }) <br /> }) <br /> </script>
      
       



    

    

        

          

              
  • This is going against heaven. A problem with browser incompatibility_html/css_WEB-ITnose
  •     
              

        

                                             160px">Homepage
                                                                                                                                                               left: 0px; top: 0px">Company Profile
">Corporate Culture
                                           < ;li>Enter the background
                                          🎜>                                                                                            Company News
Development Process
gt;
                                                                   li>
                                                                  ​                                                                                                                                                                       ;>Product display
                                                                                                               ~                     
  • 商务合作
                            

                              
    • 合作信息

    •                         
    • 联系方式

    •                         

                        

  •                     
  • 加入网能达
                            

                              
    • 招聘信息

    •                         
    • 招聘电话

    •                         

                        

  •                 
                


            

                
                

            

            
       
       

            
    • Copyright © 2012深圳市网能达科技有限公司 All rights reserved 

            

        




    css:

    body {text-align:center;background-repeat:no-repeat; width:990px; margin:0 auto; padding:0px;  background:url(../images/body_sky.jpg) no-repeat;}
    div,form,ul,ol,li,span,p{ border:0px; padding:0px; margin:0px; font-size:12px;list-style:none;}
    ul,ol,li{list-style:none}
    a{color:Black; text-decoration:none;}
    a:hover{color:Red;}
    img{ border:none;}

    .xbody{width:990px; text-align:left; margin:0 auto; height:95%;}
    .head{height:100px; }
    .head li{ float:left;}
    .for{position: relative; left:900px; top:70px; font-size:16px; font-style:italic; font-weight:bolder;}




    .menu{width:990px; float:left; display:inline; height:30px; background-image:url(../images/bar.gif); margin:10px auto;}
    .menu ul,.menu li{float:left; display:inline; position:relative;}
    .menu li a,.menu li a:hover{display:block; float:left; line-height:30px; width:160px; text-align:center; color:#FFF; font-size:14px;}
    .menu li.selected a,.menu li a:hover{background:#008000; font-weight:bold; color:#00F;}
    .menu ul li ul{position:absolute; left:0px; top:30px; display:none; width:160px;}
    .menu ul li.selected ul{display:block;}
    .menu li.selected li a,.menu li.selected li a:hover{background:#4490CE; color:#000; font-weight:normal;}
    .menu li.selected li a:hover{background:#000; color:#FFF;}

    .footer
    {  
     text-align:center;
         background-image:url(../images/foot_bg.jpg);
       
    }


    回复讨论(解决方案)

    你在footer上面加个float:left

    你在footer上面加个float:left 跪谢Q立竿见影。。。不知大师能解释下否?

    应该是上面的层有浮动的,所以影响到了他你如果给footer加上个clear:both应该也没问题的

    应该是上面的层有浮动的,所以影响到了他你如果给footer加上个clear:both应该也没问题的 再一次帮到我了

    我想说加了.clear{clear:both 好像也还是没用哦

    css不全页面看得很痛苦...大致是浮动没有清除的原因.


      

        
    • This is going against heaven. A problem with browser incompatibility_html/css_WEB-ITnose
    •   



    style="max-width:90%"/>

    这两行的高度不一致~ 这个在兼容方面造成错误的~

    另一个方面~
      


      
    • Copyright © 2012深圳市网能达科技有限公司 All rights reserved 

      


    加个清理就好了~

    大哥,我是分离样式和页面文件的写法,在你样式文件的写.clear{clear:both}然后在页面文件里面引用


    直接加就要这样写

    我想说加了.clear{clear:both 好像也还是没用哦
    Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

    HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

    From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

    HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

    Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

    WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

    The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

    The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

    HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

    HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

    HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

    HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

    The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 08, 2025 pm 07:05 PM

    HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

    Is HTML easy to learn for beginners?Is HTML easy to learn for beginners?Apr 07, 2025 am 12:11 AM

    HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. How to Fix Audio if You Can't Hear Anyone
    4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
    WWE 2K25: How To Unlock Everything In MyRise
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    MantisBT

    MantisBT

    Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

    Atom editor mac version download

    Atom editor mac version download

    The most popular open source editor

    SublimeText3 Linux new version

    SublimeText3 Linux new version

    SublimeText3 Linux latest version

    DVWA

    DVWA

    Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),