• Scharfheimlich

    (@scharfheimlich)


    Good morning Michael or anybody who can help me with this issue…

    I was trying to implement a code (which can be found here) to a [cfdb-table] shortcode. I was successful to change padding, borders, body color, but there I got stuck.

    Could be anyone so kind to help me, how to get this code to work?

    table { margin: 1em; border-collapse: collapse; }
    td, th { padding: .3em; border: 1px #ccc solid; }
    thead { background: #fc9; }
    tbody { background: #9cf; }
    #highlight tr.hilight { background: #c9f; }

    Thank you…

    With kind regards… Stefan alias “Scharfheimlich”

    http://ww.wp.xz.cn/extend/plugins/contact-form-7-to-database-extension/

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Generally speaking, best practice is to have such styles apply to only the table generated by the short code and not to all tables in the page. Give your table an html id via the short code (like [cfdb-table form="myform" id="myformid"] ) then apply CSS using #myformid selector. See http://cfdbplugin.com/?page_id=93#style

    One thing to note is that the short code outputs a table where each cell contains a DIV which then contains the actual content.

    It looks like you want to highlight a row where the TR has a “highlight” class. There is no way for the short code to tag a specific row with a class. You would have to find another way to identify that row via a CSS selector. If you want to highlight all rows, you can use #myformid tbody tr div { background: #c9f; }

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Contact Form 7 to Database Extension] Problems with CSS inject’ is closed to new replies.