-
AuthorPosts
-
monalh Friend
monalh
- Join date:
- March 2012
- Posts:
- 68
- Downloads:
- 23
- Uploads:
- 21
- Thanks:
- 17
- Thanked:
- 1 times in 1 posts
August 29, 2014 at 1:42 pm #200905Hi,
I’m a rookie in Joomla, and I am hoping for some
guidance with a problem that is probably very easy 😉 I have my css set to show tables with padding 6px. But on some very few tables, which I am only using as a text-holder, I would like the padding to be 0px. Even if I write 0 under table settings in the specific article, it does not work.Any ideas as for how I can solve this? Can I use a table class, and how do I set the parameter, or is it any other good idea?
Thanks in advance!
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
August 29, 2014 at 3:22 pm #547680Can you be a bit more specific as to which particular tables within your site you are referring?
Which ones do you want the 6px padding and which for the 0px padding? (maybe a screenshot?)
monalh Friendmonalh
- Join date:
- March 2012
- Posts:
- 68
- Downloads:
- 23
- Uploads:
- 21
- Thanks:
- 17
- Thanked:
- 1 times in 1 posts
September 3, 2014 at 10:04 am #548128Hi, thanks for your reply.
Ok, here is an example of a table I want to have 0 cell spacing: http://www.wayosi.no/ninja (table without border color with heading DATA and PHOTOS). I want to use tables to create columns the “easy” way without struggling with div’s. And because I may have some text under the table, I want the text to align perfectly on left side. Which it doesn’t do when this table have 6px padding.
Here is an example of tables where I want 6px padding (http://www.wayosi.no/c-litter, both tables on this site).
I usually want my tables to have 6px padding as “deafult” and my template.css looks like this:td {
font-size: 100%;
padding: 6px; }So the question is how do I manage to override the 6px padding on some tables?
Mona
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
September 4, 2014 at 3:58 am #548219Hi Mona,
For table that you don’t want to apply padding, just give it a class name and set separate CSS style for it. For example : navigate to this article, hit the Toggle / Code button in WYSIWYG editor to edit the code, you will see the table HTML tag similar to this :
<table style="width: 100%;">
then add a class name as below :
<table style="width: 100%;" class="no-border">The last step is to open appropriate CSS file, then add this code :
.no-border td {
padding: 0;
} -
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by Adam M 10 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum