Jump to content

How to give height of table thead in bootstrap theme of drupal


newcoder1010
 Share

Recommended Posts

Hi,

 

This is my site. I created a views table and I simply try to give height to table thead but it is not working. If you could help me with css, please.

 

http://godrupal.info/xpressauto/?q=xpress-vehicles-inventory-in-atlantic-city-nj

<table class="views-table cols-5 table table-hover table-striped">
         <thead>
      <tr>
                  <th class="views-field views-field-field-main-image">
            Image          </th>
                  <th class="views-field views-field-field-car-make">
            Make          </th>
      </tr>
    </thead>
    
</table>
.views-table th {background:gray;height:40px; color:white;} 

background colors and colors are working but height is not working. when I inspect in chrome it says dim is 1140px x 100px for thead. By inspecting, I could not find out which file has the dim info.

 

Can you help me to make the th height 40px?

 

Thanks.

 

Link to comment
Share on other sites

You have class 'views-field-field-main-image' within the th element, so

.view-xpress-vehicles-inventory-in-atlantic-city-nj .views-field-field-main-image {
    height: 100px;
    width: 200px;
}

a few lines below

.views-table th {
    background: none repeat scroll 0 0 gray;
    color: white;
    height: 40px;
    margin-top: 10px;
}

will overrule 40px height, i don't know why class 'views-field-field-main-image' is even in the th element in the first place?

Link to comment
Share on other sites

I have removed this code:

	.view-xpress-vehicles-inventory-in-atlantic-city-nj  .views-field-field-main-image {width:200px; height:100px;}

I have added this code:

.views-table th {
    background: none repeat scroll 0 0 gray;
    color: white;
    height: 40px;
    margin-top: 10px;
}

When i inspect the header on my page, I see thead dim is 1140px x 50px. I expected the height to be 40px instead.

 

Can you advise?

Link to comment
Share on other sites

Yes! but IF you look, you will see you have a listing of th{height: 40px;} which seems to be in a minimized cached css file.

 

http://godrupal.info/xpressauto/sites/default/files/css/css_GyolChYIQGdpJjWsdQ5nQPcVYTi4re1EopQIZsWPC5U.css

 

You need to turn off caching of site and clear, if you plan to make amendments, else you will always get this problem, also your caching seems to link to multiple caching of the same files?

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...