Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#16 | Flex Property.png | 33.37 KB | A.Fallaha |
Comments
Comment #1
jimmymc CreditAttribution: jimmymc commentedhey 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?
Comment #2
bootn CreditAttribution: bootn commentedHi 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!
Comment #3
therealscriba CreditAttribution: therealscriba commentededit the style.css file won't fix the problem (I renamed the stylesheet and saw to the table, the stupid grey line stays!!) :(
Comment #4
VannaL CreditAttribution: VannaL commentedThis 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!
Comment #5
douglaslopezt CreditAttribution: douglaslopezt commentedThanks VannaL.
This works perfect :D
Comment #6
gtsopour CreditAttribution: gtsopour commentedComment #7
gtsopour CreditAttribution: gtsopour commentedHello 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)
To
Regarding the table borders, you are able to remove them by adding the class "noborder"
<table class="noborder"></table>
Thanks again
/George
Comment #8
gtsopour CreditAttribution: gtsopour commentedHello 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
Comment #10
Michel2852 CreditAttribution: Michel2852 commentedI 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
Comment #11
JamiRae CreditAttribution: JamiRae commentedMichel2852 - 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:
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
Comment #11.0
JamiRae CreditAttribution: JamiRae commentedspelling mistake
Comment #12
sdoles CreditAttribution: sdoles commentedI 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
Comment #13
nevets CreditAttribution: nevets commentedThis is an old thread, you really should have opened a new topic.
As for your question, the border is on the tbody element.
Comment #14
sdoles CreditAttribution: sdoles commentedi 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
Comment #15
binayakm1@gmail.com CreditAttribution: binayakm1@gmail.com as a volunteer and commentedJust do this way to get completely border less table.
table, tr, td , th { border: none; border-spacing:0; }Comment #16
A.Fallaha CreditAttribution: A.Fallaha as a volunteer and commentedVersion: 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.
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!
Comment #17
apaderno