2013-01-31 3 views
0

트위터 부트 스트랩과 함께 .haml을 사용하여 두 개의 테이블을 만들려고합니다. 문제는 내 두 번째 테이블이 멋지게 렌더링된다는 것입니다. 그러나 텍스트가 훨씬 적은 첫 번째 테이블은 페이지 전체에서 끝이없는 것처럼 보입니다. 첫 번째 테이블 열 너비를 두 번째 테이블과 다른 너비로 작게 설정할 수 있습니까? 나는 시도했다 : class => "table table-condensed"하지만 여전히 너무 컸다.Twitter 부트 스트랩 테이블 열 - 두 번째 테이블보다 짧은 첫 번째 테이블의 열 너비

%html 
    %head 
    %link(rel="stylesheet" href="css/bootstrap.css") 
    %link(rel="stylesheet" href="css/my.css") 
    %title Working Units 
    %body 
    %p 
    %p These are the units that are updating. 
%table{:class => "table table-bordered"} 
    %thead 
    %tr 
     %th Job 
     %th Age 
    %tbody 
    - @plines.each do |row| 
     %tr 
     - row.split(/[-,]/).each do |column| 
      %td= column 
%p These are the units that are not updating. 
%table{:class => "table table-bordered"} 
    %thead 
    %tr 
     %th Job 
     %th Age 
     %th Time 
    %tbody 
    - @mlines.each do |row| 
     %tr 
     - row.split(/[-,]/).each do |column| 
      %td= column 
%a{:href=>"/"} Back to the form 

답변

0

랩 특정 폭이 div의 테이블 :

:css 
    .halfsize { 
      width: 50%; 
    } 
.halfsize 
    %table{:class => "table table-bordered"} 
     %thead 
     %tr 
      %th Job 
      %th Age 
     %tbody 
     - @plines.each do |row| 
      %tr 
      - row.split(/[-,]/).each do |column| 
       %td= column 
+0

감사합니다; 이것은 도움이되었다. – jumar

관련 문제