2013-03-23 22 views
1

我打算用大寬度顯示一個表格,水平滾動,所以我還沒有」創建一個CSSØHTML代碼來顯示這個表,可以在水平方式如何允許在網頁中

移動enter image description here

應該與水平滾動的唯一部分是在中心(白色)。這是我的默認剃鬚刀視圖。

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8" /> 
     <title>@ViewBag.Title</title> 
     <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> 
     <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0" /> 
     @Styles.Render("~/Content/css") 
     @Styles.Render("~/Content/themes/base/css") 
     @Scripts.Render("~/bundles/modernizr") 
    </head> 
    <body> 
     <header> 
      <div class="content-wrapper"> 
       <div class="float-left"> 
        <p class="site-title">@Html.ActionLink("MS. GARCIA MATH 7TH", "Index", "Home")</p> 
       </div> 
       <div class="float-right"> 
        <section id="login"> 
         @Html.Partial("_LoginPartial") 
        </section> 
        <nav>...</nav> 
       </div> 
      </div> 
     </header> 
     <div id="body"> 
      @RenderSection("featured", required: false) 
      <section class="content-wrapper main-content clear-fix"> 
       @RenderBody() 
      </section> 
     </div> 
     <footer> 
      ... 
     </footer> 

     @Scripts.Render("~/bundles/otf") 

     @RenderSection("scripts", required: false) 
    </body> 
</html> 
+0

敷在有限寬度的一個div – 2013-03-23 05:22:13

回答

1

嘗試溢出滾動

table 
{ 
overflow: scroll; 
} 
2

集溢流滾動

#body{ 
    overflow-x: scroll; 
}