Forum Discussion

SalesInfo's avatar
SalesInfo
Qrew Assistant Captain
7 years ago

there are white spaces between elements when adding background color using IOL technique

I added a background color for the whole section by using IOL technique. It was working perfectly fine before I change something in the dev console yesterday. I am not sure what I did and I think I messed up somewhere. Now i redid the whole thing and there are white spaces between elements between the background color. Does anyone have any idea how to fix this problem?
 
BEFORE


NOW - There are white spaces between elements 


Please help with this problem. THANKS!!
  • It looks to me like you may have changed the placement of the label. Moving it from above to the left. This is controlled by the form properties.

    There may be other issues at play, but that one stands out to me as a difference between the two.

    -Sharon
  • I don't know exactly what you did because you did not post any code but I can give you an understanding of why these white gaps appear. Using CSS QuickBase uses white borders on the <table> elements used to layout a section. This is a bit unusual and can be difficult to detect as most of the time table cell borders are black or some other visible color.

    So you have to set the background-color on the table and the border-color for the cells:
    $("table.formSection").css("background-color", "yellow");
    $("table.formSection tr td").css("border-color", "yellow");
    • SalesInfo's avatar
      SalesInfo
      Qrew Assistant Captain
      Thanks for your code. However, if I set the background color on the table and the border color for the cell, the background color will be filled for the whole form which I don't want it to be. I only want to customize the background color for one tab, not the whole form. I am sticking with what is showing in the screenshot below. If you have any idea to make all the white spaces between elements to be filled in yellow, that would be great. Otherwise, I am sticking with this. Thanks!!


    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      >  if I set the background color on the table and the border color for the cell, the background color will be filled for the whole form which I don't want it to be

      You just have to qualify which table section you want to modify by providing an appropriate selector:
      $("<selector> table.formSection").css("background-color", "yellow");
      $("<selector> table.formSection tr td").css("border-color", "yellow");

      I don't know what <selector> should be as it would be specific to your form.