Hi I have a block that displays information in a table. Only on this theme and only for this block, the block content does not inherit the sidebar width.

Table class: "sticky-enabled sticky-table"

I am not good with CSS but I think in the event people display tables in a block, there should be a new CSS entry defining width as 100%??

See screen shot below

CommentFileSizeAuthor
#1 ScreenShot007.jpg11.27 KBHS
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HS’s picture

FileSize
11.27 KB

Ignore the class above. I don't think that's correct.

Screenshot is attached here. For some reason it didn't attach to the above.

NaheemSays’s picture

Status: Active » Needs review

I can see in the css that tables in the content region are made 100% width and not the rest. I will fix this shortly, but in the meantime you can add the following css to a local.css file in the theme folder:

table {
  width:100%;
  border:1px solid #C8DBEA;
  border-collapse: separate;
  padding:0;
  margin:0px 0 10px 0;
}

table th {
  background-color:#C8DBEA;
  padding: 2px 5px;
  color: #3c78a7;
  line-height:1.5em;
}

table th, .topics, .posts, .last-reply , .created {
  text-align:center;
}

table td {
  padding: 2px 5px;
  line-height:1.5em;
}

tr.odd {
  background-color: #edf5fa;
}

tr.even {
  background-color: #E7F2F9;
}

(if that results in other problems, please let me know.)

HS’s picture

Hi thanks for the code above. I am a newb at this, can you please explain what in the above changes the table width in sidebars? The only reason I ask is that I'm using it on a production site and don't want to have anything else broken as a result.

Thanks again!