[Resolved] "Blog Page Header" Plugin / Inserting tables

Home Forums Support [Resolved] "Blog Page Header" Plugin / Inserting tables

Home Forums Support "Blog Page Header" Plugin / Inserting tables

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #169233
    Jaakko Pöntinen

    Hey.

    Trying to insert a simple 1-row, 3-column table with 0% padding, 0% margin and 0px borders into the BPH. The content editor keeps editing out tags like <style> so that the style settings show up as text when I preview them on the frontend. Here’s what I write into the content editor of BPH:

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    table, th, td {
    border: 0px solid black;
    padding: 0px;
    }
    table {
    border-spacing: 0px;
    }
    </style>
    </head>
    <body>

    <table style=”width:100%”>
    <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
    </tr>
    </table>
    </body>
    </html>

    Now this is a modified copy from http://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_cellspacing. The modified version works nicely in the tryit editor.

    What am I doing wrong? A lot, I think. I’d really need to get my head around the most basic HTML and CSS – I can’t even tell which bit of code is which. But: I am learning, though it feels like I’m climbing the apple tree feet first.

    – Jaakko Pöntinen

    #169236
    Jaakko Pöntinen

    Ok,

    doing research it seems that control over HTML table style has been largely transferred from HTML to CSS. What the heck do I do now, since CSS is not allowed in the BPH content editor?

    Now my code looks as follow:

    <table width=”100%” cellspacing=”0″ cellpadding=”0″ border=”0″ align=”center” bgcolor=””>

    <tr bgcolor=””>
    <td width=”33%”></td>
    <td width=”34%” align=”right”>[widget id=”slideshowwidget-2″]</td>
    <td width=”33%” align=”right”>[widget id=”slideshowwidget-3″]</td>
    </tr>

    </table>

    This all works, but there’s no controlling the style almost whatsoever. Even the cellspacing, cellpadding etc variables are not accepted because of HTML5, if I’ve understood correctly.

    Thanks,
    – Jaakko Pöntinen

    • This reply was modified 8 years, 2 months ago by Jaakko Pöntinen. Reason: Just added some stuff
    #169238
    Jaakko Pöntinen

    I’ve understood that in the world of CSS, anything could be placed anywhere, being relative in position and size to anything (other CSS elements). I want two, maybe three slideshows on my header. I feel like jumping out the window. Just ain’t got the skills and it’s driving me nuts.

    Sorry for the rant, it’s not directed at anyone or anything in specific, just to let out steam.

    – Jaakko

    #169339
    Tom
    Lead Developer
    Lead Developer

    You can give the table a class: <table class="my-custom-table"...

    Then apply specific CSS to it for padding, spacing etc..

    However, if you’re wanting to add columns, use our Lightweight Grid Columns plugin: https://wordpress.org/plugins/lightweight-grid-columns/

    Tables are meant for tabular data (stats etc..)

    #169376
    Jaakko Pöntinen

    All I can say is yes, the method you suggested works 100% and is the right thing for this. Gotta love CSS, just have to wrap my head around how to not mess style with content and how to make things so that CSS gets a hold of it. Downloaded the plugin, gave the columns classes and well, CSS’d what I needed. Thanks!

    – Jaakko

    #169387
    Tom
    Lead Developer
    Lead Developer

    Perfect, glad it worked 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.