2013-09-21 2 views
0

입니다. 하나의 페이지 사이트에서 작업 중이며 html이 6 개의 섹션으로 수정되었습니다. 인터넷 익스플로러를 제외한 모든 브라우저에서 완벽하게 작동합니다. 그것은 두 번째와 마지막 두 섹션 사이에 (하나의 추가 섹션으로 수정 된 버전에서) js 쿼리를 벗으려고했는데, 그게 아무것도 그게 내 css와 관련이 있다고 내 의혹을 확인하지 않았다 . 나는 웹 디자인에서 아주 새로운 그리고 난하시기 바랍니다 조정 (이 추가 섹션이없는 버전) 아래의 코드를 살펴 해야할지 모르겠어요 :이 작업을 수행하기 위해 수정해야하는 CSS의 부분은

HTML :

<html xmlns="http://www.w3.org/1999/xhtml"> 
     <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     <meta name="keywords" content="metro, free website template, beautiful grid, image grid menu, colorful theme" /> 
     <meta name="description" content="Metro is a free website template by templatemo.com and it features jQuery horizontal scrolling among pages." /> 

     <link href="templatemo_style.css" type="text/css" rel="stylesheet" /> 
     <script type="text/javascript" src="js/jquery.min.js"></script> 
     <script type="text/javascript" src="js/jquery.scrollTo-min.js"></script> 
     <script type="text/javascript" src="js/jquery.localscroll-min.js"></script> 
     <script type="text/javascript" src="js/init.js"></script> 

     <link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" /> 
     <script type="text/JavaScript" src="js/slimbox2.js"></script> 

    </head> 
    <body> 
    <div id="templatemo_header"> 
     <div id="site_title"><h1><a href="http://www.templatemo.com" title="Free Website Template">Metro</a></h1></div> 
    </div> 
    <div id="templatemo_main"> 
     <div id="content"> 
      <div id="home" class="section"> 

       <div id="home_about" class="box"> 
        <h2>Welcome</h2> 
        <p>Metro is a <a href="http://www.templatemo.com/page/1">free website template</a> for everyone from <a href="http://www.templatemo.com">templatemo.com</a> and it can be used for any purpose. Validate <a href="http://validator.w3.org/check?uri=referer" rel="nofollow"><strong>XHTML</strong></a> &amp; <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="nofollow"><strong>CSS</strong></a>. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus felis leo, feugiat sed porttitor sagittis, facilisis sit amet lectus. Aenean elementum tellus auctor dolor auctor luctus. Vivamus eu orci purus, ut vulputate nisl.</p> 
        <p>Praesent imperdiet mauris et lorem malesuada consequat. Proin nisl metus, faucibus vitae malesuada non, interdum sed felis. Sed ut turpis feugiat lorem faucibus dignissim. Donec magna tellus, feugiat vel fermentum eget, fringilla at metus.</p> 
       </div> 

       <div id="home_gallery" class="box no_mr"> 
        <a href="images/gallery/01-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/01.jpg" alt="image 1" /></a> 
        <a href="images/gallery/02-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/02.jpg" alt="image 2" /></a> 
        <a href="images/gallery/03-l.jpg" rel="lightbox[gallery]" class="no_mr"><img src="images/gallery/03.jpg" alt="image 3" /></a> 
        <a href="images/gallery/04-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/04.jpg" alt="image 4" /></a> 
        <a href="images/gallery/05-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/05.jpg" alt="image 5" /></a> 
        <a href="images/gallery/06-l.jpg" rel="lightbox[gallery]" class="no_mr"><img src="images/gallery/06.jpg" alt="image 6" /></a> 
       </div> 

       <div class="box home_box1 color1"> 
        <a href="#services"><img src="images/templatemo_services.jpg" alt="Services" /></a> 
       </div> 

       <div class="box home_box1 color2"> 
        <a href="#testimonial"><img src="images/testimonial.jpg" alt="Testimonial" /></a> 
       </div> 

       <div class="box home_box2 color3"> 
        <div id="social_links"> 
         <a href="https://www.facebook.com/templatemo"><img src="images/facebook.png" alt="Facebook" /></a> 
         <a href="#"><img src="images/flickr.png" alt="Flickr" /></a> 
         <a href="https://www.facebook.com/templatemo"><img src="images/twitter.png" alt="Twitter" /></a> 
         <a href="#"><img src="images/youtube.png" alt="Youtube" /></a> 
         <a href="https://www.facebook.com/templatemo"><img src="images/vimeo.png" alt="Vimeo" /></a> 
        <div class="clear h20"></div> 
         <h3>Social</h3> 
        </div>  
       </div> 

       <div class="box home_box1 color4 no_mr"> 
        <a href="#contact"><img src="images/contact.jpg" alt="Contact" /></a> 
       </div> 

      </div> <!-- END of home --> 

      <div class="section section_with_padding" id="services"> 
       <h2>Services</h2> 
       <div class="img_border img_fl"> 
        <img src="images/templatemo_image_03.jpg" alt="image" />  
       </div> 
       <div class="half right"> 
        <ul class="list_bullet"> 
         <li>Maecenas ac odio ipsum donec cursus</li> 
         <li>Fusce risus tortor, interdum</li> 
         <li>Proin facilisis ullamcorper</li> 
         <li>Sed vel justo quis ligula</li> 
         <li>Ut tristique sagittis arcu</li> 
         <li>Maecenas ac odio ipsum donec cursus</li> 
         <li>Fusce risus tortor, interdum</li> 
        </ul> 
       </div> 
       <div class="clear h40"></div> 
       <div class="img_border img_fr"> 
        <img src="images/templatemo_image_04.jpg" alt="image" />  
       </div> 
       <div class="half left">     
        <p><em>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam mauris ipsum, pulvinar sit amet varius at, placerat ut felis.</em></p> 
        <p>Donec vitae tortor non ipsum tristique condimentum ac ac nulla. Etiam sagittis iaculis dolor ut euismod. Nam faucibus, risus at consequat malesuada, urna turpis sagittis libero, sodales hendrerit dui arcu et nisi. Praesent pulvinar, dolor id lacinia pulvinar, mi ligula tempor libero, et semper sem dolor et elit. </p> 
       </div> 

       <a href="#home" class="slider_nav_btn home_btn">home</a> 
       <a href="#home" class="slider_nav_btn previous_btn">Previous</a> 
       <a href="#testimonial" class="slider_nav_btn next_btn">Next</a> 

      </div> 
      <div class="section section_with_padding" id="testimonial"> 
       <h2>Testimonial</h2> 
       <p><em>Aliquam venenatis, quam a semper blandit, lectus mi convallis orci, ut dictum ante leo non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris placerat, urna in gravida rhoncus, mi elit luctus nibh, a luctus erat elit vel quam. </em></p> 
       <div class="clear h40"></div> 
       <div class="half left"> 
        <div class="img_border img_fl"> 
         <img src="images/templatemo_image_01.jpg" alt="image 1" /> 
        </div> 
        <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p> 
        <cite>Walker - <span>TemplateMo.com</span></cite> 
       </div> 
       <div class="half right"> 
        <div class="img_border img_fl"> 
         <img src="images/templatemo_image_01.jpg" alt="image 2" /> 
        </div> 
        <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p> 
        <cite>Jason - <span>TemplateMo.com</span></cite> 
       </div> 
       <div class="clear h40"></div> 
       <div class="half left"> 
        <div class="img_border img_fl"> 
         <img src="images/templatemo_image_01.jpg" alt="image 3" /> 
        </div> 
        <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p> 
        <cite>Danny - <span>FlashMo.com</span></cite> 
       </div> 
       <div class="half right"> 
        <div class="img_border img_fl"> 
         <img src="images/templatemo_image_01.jpg" alt="image 4" /> 
        </div> 
        <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p> 
        <cite>Katey - <span>KoFlash.com</span></cite> 
       </div> 

       <a href="#home" class="slider_nav_btn home_btn">home</a> 
       <a href="#services" class="slider_nav_btn previous_btn">Previous</a> 
       <a href="#contact" class="slider_nav_btn next_btn">Next</a> 
      </div> 
      <div class="section section_with_padding" id="contact"> 
       <h2>Contact</h2> 
       <div class="half left"> 
        <h4>Quick Contact Form</h4> 
        <p>Nullam a tortor est, congue fermentum nisi. Maecenas nulla nulla, eu volutpat euismod, scelerisque ut dui.</p> 
        <div id="contact_form"> 
         <form method="post" name="contact" action="#contact"> 
          <div class="left"> 
           <label for="author">Name:</label> <input name="author" type="text" class="input_field" id="author" maxlength="40" /> 
          </div> 
          <div class="right">       
           <label for="email">Email:</label> <input name="email" type="text" class="input_field" id="email" maxlength="40" /> 
          </div> 
          <div class="clear"></div> 
          <label for="text">Message:</label> <textarea id="text" name="text" rows="0" cols="0"></textarea> 
          <input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" /> 
         </form> 
        </div> 
       </div> 

       <div class="half right"> 
        <h4>Mailing Address</h4> 
        460-820 Duis lacinia dictum, <br /> 
        Vestibulum auctor, 12650<br /> 
        Nam rhoncus, diam a mollis<br /> 
        <strong>Email: info[ at ]companyname[ dot ]com</strong><br /> 

        <div class="clear h20"></div> 
        <div class="img_nom img_border"><span></span> 

        <iframe width="320" height="240" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Central+Park,+New+York,+NY,+USA&amp;aq=0&amp;sll=14.093957,1.318359&amp;sspn=69.699334,135.263672&amp;vpsrc=6&amp;ie=UTF8&amp;hq=Central+Park,+New+York,+NY,+USA&amp;ll=40.778265,-73.96988&amp;spn=0.033797,0.06403&amp;t=m&amp;output=embed"></iframe> 

       </div> 
       <a href="#home" class="slider_nav_btn home_btn">home</a> 
       <a href="#testimonial" class="slider_nav_btn previous_btn">Previous</a> 

      </div> 
     </div> 
    </div> 
    </div> 
    <div id="templatemo_footer"> 
     Copyright © 2072 <a href="#">Your Company Name</a> | Designed by <a href="http://www.templatemo.com" target="_parent">Free CSS Templates</a> 
    </div> 

    </body> 
    </html> 

CSS 여기

#templatemo_main { 
     width: 800px; 
     height: 487px; 
     overflow: hidden; 
     margin: 0 auto; 
    } 

나 :

body{ 
    margin: 0; 
    padding: 0; 
    color: #ddd; 
    font-size: 12px; 
    line-height: 1.6em; 
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; 
    background-color: #000; 
} 

a, a:link, a:visited { color: #9CF; font-weight: normal; text-decoration: none } 
a:hover { color: #FF6; text-decoration: none; } 

ul, li { 
    padding:0; 
    margin:0; 
    list-style:none; 
} 

h1, h2, h3, h4, h5, h6 { color: #fff; font-weight: normal; } 
h1 { font-size: 58px; margin: 0 0 30px; padding: 5px 0 } 
h2 { font-size: 34px; margin: 0 0 30px; padding: 5px 0 } 
h3 { font-size: 20px; margin: 0 0 20px; padding: 0; } 
h4 { font-size: 16px; margin: 0 0 15px; padding: 0; } 
h5 { font-size: 14px; margin: 0 0 10px; padding: 0; } 
h6 { font-size: 12px; margin: 0 0 5px; padding: 0; font-weight: 700 } 

p { padding: 0; margin: 0 0 15px 0 } 

.clear{ 
    clear:left; 
} 

cite { font-weight: bold; color:#fff; } 
cite a, cite a:link, cite a:visited { font-size: 12px; text-decoration: none; font-style: normal } 
cite span { font-weight: 400; color: #ccc; } 


.list_bullet { margin: 0 0 10px 15px; padding: 0; list-style: none } 
.list_bullet li { color:#fff; margin: 0 0 7px 0; padding: 0 0 0 20px; background: url(images/templatemo_list.png) no-repeat scroll 0 6px } 
.list_bullet li a { color: #fff; font-weight: normal; text-decoration: none } 
.list_bullet li a:hover { color: #fff } 

.no_bullet { margin: 0; padding: 0; list-style: none } 
.no_bullet li { margin: 0 0 20px 0; padding: 0 } 
a.header { display: block; font-weight: 700 } 

.half { width: 370px } 

.h20 { height: 20px } 
.h40 { height: 40px } 

img { margin: 0; padding: 0; border: none } 
.img_border { background: #fff; padding: 4px; border: 1px solid #ccc } 
.img_nom { display: inline-block; margin-bottom: 15px } 
.img_fl { float: left; margin: 3px 15px 5px 0 } 
.img_fr { float: right; margin: 3px 0 5px 15px } 

.left { float: left } 
.right { float: right } 

#templatemo_header { 
    width: 800px; 
    margin: 0 auto; 
    padding: 30px 0; 
} 

#templatemo_main { 
    width: 800px; 
    height: 487px; 
    overflow: hidden; 
    margin: 0 auto; 
} 

#templatemo_footer { 
    width: 800px; 
    margin: 0 auto; 
    padding: 20px 0; 
    text-align: right 
} 

#site_title { display: block } 
#site_title a { color: #fff; font-weight: 700; letter-spacing: 10px; line-height: 30px } 

#content{ 
    overflow:hidden; 
    width: 7000px; 
    position:relative; 
    height: 487px; 
} 

.section { 
    position:relative; 
    float:left; 
    width: 800px; 
    height: 487px; 
    margin-right: 20px; 
} 

.section a.slider_nav_btn { position: absolute; top: 0; width: 50px; height: 46px; display: block; background-image: url(images/slider_nav_btn.jpg); text-indent: -10000px } 
.section a.home_btn { right: 50px; background-position: 102px 0 } 
.section a.previous_btn { right: 100px; background-position: 0 0 } 
.section a.next_btn { right: 0px; background-position: 50px 0 } 

.box { float: left; margin: 0 10px 10px 0 } 
#home_about { width: 314px; height: 314px } 
#home_gallery { width: 476px; height: 314px } 
.home_box1 { width: 152px; height: 152px } 
.home_box2 { width: 314px; height: 152px } 
.color1 { background: #d0b500 } 
.color2 { background: #c75000 } 
.color3 { background: #00afce } 
.color4 { background: #a4c700 } 
#home_gallery a { display: block; float: left; width: 152px; height: 152px; margin: 0 10px 10px 0 } 
#home_gallery a.no_mr { margin-right: 0 } 

#social_links { 
    text-align: center; 
    padding: 40px 0 0 0 
} 
#social_links a { 
    display: block; 
    float: left; 
    width: 48px; 
    height: 48px; 
    margin-left: 12px 
} 

#gallery { 

} 

#gallery li { 
    width: auto; 
    height: auto; 
    float: left; 
    width: 152px; 
    height: 245px; 
    background: none; 
    margin: 0 10px 10px 0; 
} 
#gallery li a { 
    display: block; 
} 
#gallery li a img { } 

#gallery li.no_margin_right { margin-right: 0 } 

#contact_form { padding: 0; width: 330px } 

#contact_form form { margin: 0px; padding: 0px; } 

#contact_form form .input_field { width: 150px; padding: 5px; color: #CCC; border: 1px solid #666; background: #222; margin-bottom: 10px; } 

#contact_form form label { display: block;font-size: 11px } 

#contact_form form textarea { 
    clear: both; 
    width: 320px; height: 120px; 
    padding: 5px; 
    color: #CCC; 
    border: 1px solid #666; 
    font-family: Arial, Helvetica, sans-serif; 
    background: #222; 
    margin-bottom: 10px; 
} 

#contact_form form .submit_btn { font-size: 12px; background: #333; color: #CCC; cursor:pointer; border: 1px solid #666; padding: 5px 10px; } 

.no_mr { margin-right: 0 } 

나는 문제가 여기도 확신

#content{ 
     overflow:hidden; 
     width: 7000px; 
     position:relative; 
     height: 487px; 
    } 

무엇을 조정해야하는지 잘 모르겠으며 많은 도움을 받으실 수 있습니다!

추 신 : 저는 새로운 흐름에 쌓기가 새로 생겼습니다. 그리고 이것이 당신이 묻고있는 질문 유형인지는 모르겠습니다. 그것이 아닌지 알려주세요! :)

답변

0

IE10에서 CSS3의 지원이 충분하기 때문에 이전 버전의 브라우저에서 사이트를 테스트하고있는 것 같습니다.

이전 IE 버전에서는 작동하지 않는 CSS 요소가 많이 있습니다. 약간의 호환성을 얻으려면 Modernizr과 같은 라이브러리를 사용하는 것이 좋습니다.

귀하가 제공 한 정보가 너무 광범위합니다. 당신이 관찰하고있는 정확한 오류는 무엇입니까? 하지만 빠른보기를 취하면 "디스플레이 : 인라인 블록"을 볼 수 있습니다. 확실히 작동하지 않을 수도 있습니다. "float : left;"의 조합을 시도해야합니다. "display : block"및 해당 요소의 폭을 지정합니다.

정확한 오류를 조금 더 구체적으로 지정하면 코드의 관련 부분을 지적 할 수 있으므로 도움을받을 수 있습니다.

관련 문제