[resolved] Twentyeleven - CSS border property overriding table borders (11 posts)

  1. ScottyP
    Posted 2 years ago #

    Hi there,

    I've search for days on this, and tried a multitude of coding but cannot resolve. I have a html table (2 columns + several rows) to which i've been trying to create borders around, but something is overriding all of my border code.

    I found code in style.css (line 17) under the main selectors heading which if I remove the main border: 0 property from the parent theme, I get my desired borders.

    How do I negate this in my child style.css? I've even tried to add, for instance, table {border: 1} as a test but this is not working. Any help appreciated.

  2. mathis@Tambour
    Posted 2 years ago #

    You should write the same #div in CSS, but with : {border: 1px !important;}

  3. ScottyP
    Posted 2 years ago #

    Thanks for the reply. Tried that but to no avail. E.g. table {border: 1px !important}. In actual fact, that removes my border. I don't understand why to be honest. This obviously being done in my child theme btw.

  4. mathis@Tambour
    Posted 2 years ago #

    If you write exactly the same #div {border: 1px !important; } as parent theme, that should resolve it !

  5. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @ScottyP, it will be much easier to help you if you post a link to your site.

  6. Michael
    Forum Moderator
    Posted 2 years ago #

    the border might possibly need to be aded to tr or td

    however, formatting problems cannot be discussed without a live link to the problem site;

    also pure formatting problems are not really coverd by this forum;

    try to use a browser inspection tool such as Firebug to investigate the source of the table formatting; or ask at a css forum like http://csscreator.com/forum

  7. ScottyP
    Posted 2 years ago #

    @mathis ... if I remove border: 0 from table selector in my parent, it resolves it. I don't wish to edit my parent. I wish to override this in the child theme.

    @alchymyth ... I honestly thought it would be an easy solution that I was overlooking. I've been trawling my code with both FF's and Chrome's element inspection tools for a couple of days on and off now whilst at work trying to figure it out.

    If you still want to take a look, my table is 3/4 way down on http://saa.patonstribe.com/wordpress/congratulations/


  8. mathis@Tambour
    Posted 2 years ago #

    Here’s what you get…
    Separate Purchase
    Ultimate Secrets to Saltwater Aquarium Fish and Invertebrates 	$27.00
    Free Gift # 1: Guide to Making Money From Your Saltwater Aquarium 	$27.00
    Free Gift # 2: Guide to propagation of Invertebrates, Corals and Sea Plants 	$27.00
    Free Gift # 3: Saltwater Aquarium Set-Up Checklist 	$10.00
    Total Value:
    Your Price:
    Total package Savings:

    Is it the table ?
    You can write in your child :
    .entry-content td, .comment-content td { border-right: 1px solid #DDDDDD; }

  9. ScottyP
    Posted 2 years ago #

    Yep. That's it. There should be a vertical line/border separating the dollar values.

  10. ScottyP
    Posted 2 years ago #

    Perfect mathis. I now realised I was missing td content classes from my config. I've added them in and can play around with them, but it's exactly what I desired. Thanks a lot.

    Just out of curiosity, i've seen a myriad of posts in this forum in regards to formatting issues and questions etc. Is this something new what alchymyth was on about in terms of support for formatting issues?

  11. ScottyP
    Posted 2 years ago #

    Just realised you hit the nail on the head in your post alchymyth re: td/tr. Thanks for your input. I have only been coding for a month so just starting out but have utilised these forums a LOT to get by and learn what i've needed to.


Topic Closed

This topic has been closed to new replies.

About this Topic