First of all, thank you for a beautiful, flexible and elegant template.
I'm new to Drupal but am slowing finding my way, but have the following question:
I would like to know how I can make a table with an invisible border in an article (and a block).
The usual <table border="0"> doesn't work - I still get a table with grey 1 pixel border.
I suspect it's something to do with my lack of CSS knowledge (working on it!) but is there a workaround I can use for the moment?
Thanks,
Aptalops

CommentFileSizeAuthor
#16 Flex Property.png33.37 KBA.Fallaha
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jimmymc’s picture

Version: 7.x-1.1 » 7.x-1.3

hey there,

I'm having exactly the same issue. I've tried the following:

- Created a new CSS file:
#noborder tbody,
#noborder thead,
#noborder th {
border: 0;
}
put it into a new dir Customer_CSS in the corporateclean dir.

Edited the corporateclean.info file:
name = CorporateClean
description = CorporateClean: A flexible, recolorable theme with many regions.
version = VERSION
core = 7.x

stylesheets[all][] = style.css
stylesheets[all][] = color/colors.css
stylesheets[all][] = Custom_CSS/borders.css

and defined my table as:
table id="noborder"...

but I'm still getting that border!

I'd rather not edit the style.css file....

Any ideas what's happening?

bootn’s picture

Hi All,

Anyone have any luck with this one? Unfortunately I am a bit of a noob and cant figure this out myself except for changing styles.css but thing is I have some tables requiring a border and other none.

Thanks in advance!

therealscriba’s picture

edit the style.css file won't fix the problem (I renamed the stylesheet and saw to the table, the stupid grey line stays!!) :(

VannaL’s picture

This worked for me:

I downloaded /themes/corporateclean/style.css
Then i found the section where table is specified and changed the following:

table, td { border: 0px solid #bbbbbb; }

Before my change it was >>> table, td { border: 1px solid #bbbbbb; }

So i just replaced 1 with 0. :) I have no clue about CSS files nor i have programming skills but i just played around and it worked.

Then i uploaded the file back and there is no border!

douglaslopezt’s picture

Thanks VannaL.

This works perfect :D

gtsopour’s picture

Version: 7.x-1.3 » 7.x-1.5
Assigned: Unassigned » gtsopour
Issue tags: +corporate, +Corporate Clean Theme, +corporate clean
gtsopour’s picture

Status: Active » Fixed
Issue tags: +Corporate Clean Theme table style

Hello Aptalops - jimmymc - bootn - therealscriba - VannaL - douglaslopezt,
thank you for supporting Corporate Clean theme.

I would like to inform you that just made and committed the following changes to the table style rules. You will also notice that that I have added support for one extra table class "noborder".

Change from (style.css - Line 404)

/*  
* Tables
*/
table { border-collapse: collapse; width:100%; }

table, td { border: 1px solid #bbbbbb; }

table th { background:#222222; color:#ffffff; font-weight:bold; border:none; }

table tr.odd { background:transparent; }

table tr.even { background:#ffffff; }

table td, table th { padding:5px; }

To

/*  
* Tables
*/
table { border-spacing:0; border:0; width:100%;  }

table td, table th { border:1px solid #bbbbbb; }

table th { background:#222222; color:#ffffff; font-weight:bold; }

table tr.odd { background:transparent; }

table tr.even { background:#ffffff; }

table td, table th { padding:5px; }
/* Remove table borders */
table.noborder td, table.noborder th, table.noborder tr { border:none; }

Regarding the table borders, you are able to remove them by adding the class "noborder" <table class="noborder"></table>

Thanks again
/George

gtsopour’s picture

Hello again,
these changes will be included in next Corporate Clean releases 7.x-1.6 and 7.x-2.0 - http://drupal.org/node/1655120

Thanks again
/George

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Michel2852’s picture

I used the noborder class on the table. It almost worked great. However, there is still a single line on top of the table. I've tried alternating the style.css from
table td, table th { border:1px solid #bbbbbb; }
to
table td, table th { border:0px solid #bbbbbb; }
and it didn't work.
Any suggestions?
Thanks

JamiRae’s picture

Michel2852 - to get rid of the line you will need to do the following:

in /modules/system

edit file system.theme.css

remove or comment out lines 25 through 27. so change this:

table {
  border-collapse: collapse;
}

to comment it out like this.. adding the comment tags above and below. You can also add a brief comment to describe why you commented it out like I did below

/*  
* keep commented out to remove the border lines above tables
*
table {
  border-collapse: collapse;
}
*/
JamiRae’s picture

Issue summary: View changes

spelling mistake

sdoles’s picture

Issue summary: View changes

I am able to remove the table borders - but even with the info provided in the above posts, I cannot get rid of that top border line.

Is there another way to do this?? Example or problem: http://thementoringcollaborative.org/new/contact

nevets’s picture

This is an old thread, you really should have opened a new topic.

As for your question, the border is on the tbody element.

sdoles’s picture

i see that now - 2 years old . . .

this is my first time posting - sorry.

i tried changing the tbody element to 0px and nothing changed. i will post a new thread.

thanks nevets

binayakm1@gmail.com’s picture

Just do this way to get completely border less table.

table, tr, td , th { border: none; border-spacing:0; }
A.Fallaha’s picture

FileSize
33.37 KB

Version: 7.x
I know this thread is about creating tables with no borders on Drupal (in my case Version 7.x), however, many of the solutions described are not an option to me, since I do not have the access to the CSS files. Therefore, to go around this problem, I used the flex property in CSS.


<div style="display: flex; flex-wrap: wrap; flex-direction: raw; width: 100%;">
  <div style="flex: 0 0 33.333333%; max-width: 33.333333%;">
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
    </ul>
  </div>
  <div style="flex: 0 0 33.333333%; max-width: 33.333333%;">
    <ul>
      <li>Item 4</li>
      <li>Item 5</li>
      <li>Item 6</li>
    </ul>
  </div>
  <div style="flex: 0 0 33.333333%; max-width: 33.333333%;">
    <ul>
      <li>Item 7</li>
      <li>Item  8</li>
      <li>Item 9</li>
    </ul>
  </div>
</div>

This worked out nicely for me to create 3 parallel DIVs rather than 3 columns in a table that I couldn't disable it's borders.

I hope this helps!

apaderno’s picture

Priority: Major » Normal
Issue tags: -corporate, -Corporate Clean Theme, -corporate clean, -Corporate Clean Theme table style