• I am somewhat fluent in CSS, and when I try to format a special insert into a post I go into the CSS and add a new style for what I need to keep things clean.

    I use twentyten. What is throwing me for a loop is that I cannot seem to manage to override the table properties defined in #content. For example, I can specify border-top in my table definition, but no matter what I specify, the browser still picks the style from the #content definition section. I don’t have this issue with DIV’s or anything else, just the stupid (arrghh) tables. I know I am not alone, I’ve seen many posts on frustrated WP/twentyten users trying to wage war with tables. Frankly, I wish html tables get deprecated for good, because it’s the most horrible part of HTML ever. (I am working on learning to never use tables and use css defined containers instead, but I am not there yet, not even sure it’s possible.)

    Does anyone know how to override table properties? (please no inline html style statements.)

    The properties I am trying to override in my table, say .foo { whatever properties } and .foo tr td { whatever properties } just don’t work no matter what I specify, the browser always picks the following: (especially border-top, that one I cannot get to work, hence I had to actually change the #content code.

    Thanks.

    #content table {
    	border: 1px solid #e7e7e7;
    	margin: 0 -1px 24px 0;
    	text-align: left;
    	width: 100%;
    }
    #content tr th,
    #content thead th {
    	color: #888;
    	font-size: 12px;
    	font-weight: bold;
    	line-height: 18px;
    	padding: 9px 24px;
    }
    #content tr td {
    	border-top: 1px solid #000000;
    	padding: 6px 24px;
    }
    #content tr.odd td {
    	background: #f2f7fc;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Please post a link to a page demonstrating the problem. But be warned that your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    Thread Starter scworldnetter

    (@scworldnetter)

    Esmi, I sent you an E-mail. My site is not live yet and I’d like to upgrade to 3.04 before I even attempt to publish the URL anywhere, especially given the now publicity known security vulnerability of 3.03.

    anewholm

    (@anewholm)

    Did you resolve this? I’m not sure from the details but it may be that you need to look into CSS specificity. In short, try “body #content foo table {…}” for your override instead. It has more CSS specificity “weight”.

    anewholm

    (@anewholm)

    Updates

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Overriding #content table formatting in twentyten?’ is closed to new replies.