test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • monalh Friend
    #200905

    Hi,

    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 Moderator
    #547680

    Can 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 Friend
    #548128

    Hi, 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 Moderator
    #548219

    Hi 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;
    }

Viewing 4 posts - 1 through 4 (of 4 total)

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