WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Table cellpadding being overwritten? (12 posts)

  1. michaelborger
    Member
    Posted 3 years ago #

    Hello everybody. Regarding the page at:

    http://bigrockinvestments.com/submit-your-property/

    the cellpadding and cellspacing in the table code is not working. It's in the HTML code, but I think it's being overwritten somewhere else in the theme. I can change the values in the page HTML to whatever I want, but it doesn't change anything.

    Instead of adding this code to every <td>, where in the theme could I look for and make this change? I'm not good at CSS or PHP, so I'm a bit hesitant to just go in there and start playing with things. If your recommendation includes any CSS or PHP modifications, please be as specific as possible so I can follow your instructions as best I can.

    I ultimately want to make this table 4 columns instead of two to reduce scrolling, but I want to get the padding and spacing down first.

    Thanks for your help.

  2. Purab Kharat
    Member
    Posted 3 years ago #

    just put the following css code in your style.css file
    td{margin:px}
    This will solve your issue. for creating you need to change your theme file.

  3. elfin
    Moderator
    Posted 3 years ago #

    that CSS code does not look right. surely it should be

    td{
     margin:0;
     padding:0;
    }
  4. Root
    Member
    Posted 3 years ago #

    a good reset / base is needed to iron out browser variations in tables

  5. michaelborger
    Member
    Posted 3 years ago #

    Thank you for your feedback, folks. Would you be so kind as to tell me exactly where in my style.css I should add these lines of code?

  6. Root
    Member
    Posted 3 years ago #

    at the bottom...........

  7. michaelborger
    Member
    Posted 3 years ago #

    I added

    td{
     margin:0;
     padding:0;
    }

    as the last lines in my style.css but unfortunately nothing changed on the table itself. I've added cellspacing and cellpadding values of 100 so it will be obvious when the changes are in effect. I'm looking at this in both Safari and Firefox in my Macbook Pro.

  8. Root
    Member
    Posted 3 years ago #

    do a hard reload in yr browser

  9. michaelborger
    Member
    Posted 3 years ago #

    No changes. Are you seeing large spacing and padding on your browser for that page?

    http://bigrockinvestments.com/submit-your-property/

  10. michaelborger
    Member
    Posted 3 years ago #

    Ok I see now. When I change the values in the above code in the CSS, it makes the changes anywhere there's a table <td> on the entire website, naturally. However, even changing those values for margin and padding from 0 to 1 makes a HUGE difference in the layout.

    Also, I only want to affect the table on the above page that I referenced, not every table everywhere in the website. Isn't this possible?

    So right now I have in the HTML of the table on that specific page:
    <table border="0" cellspacing="10" cellpadding="10">
    but it's not taking. I can make those values 1000 but it doesn't matter.

  11. Root
    Member
    Posted 3 years ago #

    mixing html and styling - css - is a disaster

  12. michaelborger
    Member
    Posted 3 years ago #

    Ok I can see how that might be a problem. And I just played with some numbers and think I have it all figured out now. I need to learn some CSS going forward so I understand my site better -- I think I'm having similar conflicts between HTML in my site admin panel's posts and pages and the CSS in my stylesheet.

    I'll get it figured out.

    Thanks for all your help.

Topic Closed

This topic has been closed to new replies.

About this Topic