2012-06-12 2 views
0

웹 사이트에서 작업 중이며 페이지를 디자인했지만 크롬과 파이어 폭스에서 다른 결과를 제공합니다. 내가 원하는 레이아웃은, 크롬에서 제대로주고 있지만, 파이어 폭스는 다른 결과를주고있다 ..다른 브라우저가 웹 페이지에 대해 다른 출력을 제공합니다.

나는 또한 모든 테이블 상단에서 시작해야 함을 원하는들이 등장하고 있지만, 크롬 적절한 결과를 제공하지 않습니다 파이어 폭스처럼

내 HTML 파일의 코드를 그대로 크롬에서 파이어 폭스 Image in chrome

에서 enter image description here :

- : 나는이 스크린 샷을 첨부하고 ... 내가이 문제를 없애 도와주세요 이 포함한 3,691,363,210
<div id="page"> 
    <div class="container" >   
     <div style="overflow:hidden;"> 
      <table width="44%" > 
      <tr> 
      <th>Todays To-Do</th> 
      </tr> 
      <tr><td>T-shirts.xls</td></tr> 
      <tr><td>Caps.xls</td></tr> 
      <tr><td>Mugs.xls</td></tr> 
      <tr><td>Pens.xls</td></tr> 
      <tr><td>xxx</td></tr> 
      <tr><td>xxx</td></tr> 
      <tr><td>xxx</td></tr> 
      </table> 
      <table width="27%" > 
      <tr> 
      <th>Vendor Contact List</th> 
      </tr> 
      <tr><td>T-shirts.xls</td></tr> 
      <tr><td>Caps.xls</td></tr> 
      <tr><td>Mugs.xls</td></tr> 
      <tr><td>Pens.xls</td></tr> 
      <tr><td>xxx</td></tr> 
      </table> 
      <table width="27%"> 
      <tr> 
      <th>Price list</th> 
      </tr> 
      <tr><td>T-shirts.xls</td></tr> 
      <tr><td>Caps.xls</td></tr> 
      <tr><td>Mugs.xls</td></tr> 
      <tr><td>Pens.xls</td></tr> 
      <tr><td>xxx</td></tr> 
      </table> 
      </br> 
      </div> 
      <table width="45.56%" > 
      <tr> 
      <th>Add new+</th> 
      </tr> 
      </table> 
       </div> 
      </div> 
     </div> 

내 CSS는 다음과 같습니다

body 
{ 

    background: url(../images/bg-main.jpg)top repeat-x; 
    text-align:left; 
    color:#333; 
    font-family:Arial, Helvetica, sans-serif; 
} 

    #maincontainer-02 
    { 
     background:#ffffff; 
     border-left:1px solid #dedede!important; 
     border-right:1px solid #dedede!important; 
     margin-top:5px; 
    } 

    table 
    { 
     display:inline; 
     border-collapse: collapse; 
     border-spacing: 0px; 
    } 

    td 
    { 
     border:solid 1px #bfbfbf; 
    } 

    th 
    { 
     background-color:#bfbfbf; 
     border:solid 1px black; 
     text-align:left; 
     font-family:"Times New Roman", Times, serif; 
     font-size:1.875em; 
    } 
    * 
    { 
     margin: 0; 
     padding: 0; 
    } 

    #content 
    { 
     width:100%; 
    } 

    pre 
    { 
     border:3px solid #ccc; 
     padding:5px; 
     font-size:12px; 
     font-family:arial; 
    } 
    .bold{font-weight:bold;} 
    .blue{color:blue;} 
    .red{color:red;} 

there are its Fiddle

+1

[jsfiddle] (http://jsfiddle.net)하십시오! – WickyNilliams

답변

0

이봐,이 CSS를 사용 0}

html, body, div, span, applet, object, iframe, 
    h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
    a, abbr, acronym, address, big, cite, code, 
    del, dfn, em, img, ins, kbd, q, s, samp, 
    small, strike, strong, sub, sup, tt, var, 
    b, u, i, center, 
    dl, dt, dd, ol, ul, li, 
    fieldset, form, label, legend, 
    table, caption, tbody, tfoot, thead, tr, th, td, 
    article, aside, canvas, details, embed, 
    figure, figcaption, footer, header, hgroup, 
    menu, nav, output, ruby, section, summary, 
    time, mark, audio, video, input[type="checkbox"] { 
     margin: 0; 
     padding: 0; 
     border: 0; 
     font-size: 100%; 
     font: inherit; 
     vertical-align: baseline; 
    } 
    ol, ul { 
     list-style: none; 
    } 
    img{ 
     border:0; 
     outline:0; 
     vertical-align:top; 
    } 
    a{ 
     outline:0; 
     text-decoration:none; 
     display:inline-block; 
    } 
    table { 
     border-collapse: collapse; 
     border-spacing: 0; 
    } 
table tr td{ 
vertical-align: top; 
} 
+0

감사합니다. 테이블이 지금부터 정렬되고 있습니다 ...하지만 제발 말할 수있는 이유는 ... 크롬이 아니라 파이어 폭스에서 렌더링 된 구조입니까 ?? – Neeraj

+0

모든 브라우저는 기본 속성을 가지므로 렌더링 된 구조보다 큽니다. 모든 프로젝트에서 CSS 리셋을 사용하려면 여기를 클릭하십시오 http://meyerweb.com/eric/tools/css/reset/ –

0

시도하여 테이블에 vAlign와 = 정상을 추가.

그리고 CSS에서 HTML 및 본문의 브라우저 기본값을 재설정합니다. 이와 같이 :

html, body {margin : 0; 패딩 : CSS 파일 재설정에 대한

관련 문제