[Plugin: WP-Table Reloaded] How to put image background.
-
Hello,
I’m new to CSS, may I ask if how can I add a background image to the wp-table-reloaded table head.
Also a how can I customize the edge of the table. I saw someone has a rounded corners of his tables.
Thank you,
Algen
-
Hi,
I don’t know the exact code necessary for your site, so my suggestion here is: Try learning the basics of CSS from a tutorial website first, as that should bring you a better understanding.
There should also be hints on how to achieve rounded corners (which by the way don’t work on all browsers!).
Then, once you have found the properties that you’ll need to change, just apply them to WP-Table Reloaded’s HTML, with some “Custom CSS” like.wp-table-reloaded { /* properties for rounded corners */ } .wp-table-reloaded thead th { /* properties for background image in the head, e.g. */ background-image: url('myimage.jpg'); }Best wishes,
TobiasHello Tobias
The code for the rounded edges doesn’t seem to work.
I tried this first set of code but no luck:
.wp-table-reloaded th, .wp-table-reloaded .sorting {
background-color: #24538A!important;
}
.wp-table-reloaded .sorting_asc, .wp-table-reloaded .sorting_desc {
background-color: #24538A!important;
}
.wp-table-reloaded {
border-top-left-radius: 40em!important;
border-top-right-radius: 40em!important;
border-bottom-right-radius: 40em!important;
border-bottom-left-radius: 40em!important;
}I also tried the one the does not put the “!important” but no luck either:
.wp-table-reloaded th, .wp-table-reloaded .sorting {
background-color: #24538A!important;
}
.wp-table-reloaded .sorting_asc, .wp-table-reloaded .sorting_desc {
background-color: #24538A!important;
}
.wp-table-reloaded {
border-top-left-radius: 40em;
border-top-right-radius: 40em;
border-bottom-right-radius: 40em;
border-bottom-left-radius: 40em;
}Any suggestions?
Thank you,
Algen
Hi,
what browser were you using?
I’m not sure, but it’s possible that this CSS only works in Safari or Firefox.And can you provide the URL of the page with the table where you tested this?
Thanks!
TobiasHi Tobias,
I am trying to insert an image using wp-table reloaded and I can see the wheel spinning forever after I have inserted the URL of the image in the URL option of WordPress.
When doing exactly the same, namely inserting an image via the URL option just using WordPress, it works fine.
Can you help?
Bye,
Bee
Hi,
unfortunately I can not reproduce this error on any of my test installations. This likely means that you have another plugin activated which causes a JavaScript conflict, which breaks the feature.
You can either try to find that plugin, or you can just insert the image manually, by just typing the HTML code for it into the cell (and adjust the URL in the code):
<img src="http://www.example.com/myimage.jpg" alt="my image description" />Regards,
TobiasOkay I’m equally trying to get rounded border on a number of section headers in a table. I’m trying to get it working by having 4 individual corner images (each 7 x 7 px) which occupy the cells surrounding the cell I want rounding as per the link here.
http://www.webdevelopersnotes.com/tips/html/html_table_tutorial_rounded_corners.php3But it is not working as I can’t seem to get rid of padding that is sneaking in.
The post tag is:
[table id=1 cellspacing=”0″ cellpadding=”0″ border=”0″ /]and the preview post with the table is:
http://www.whichplm.com/?p=3829&preview=trueI do not have data tables enabled, and the corner images are inserted along with the section header text in the table edit rather than through CSS for ease. Does putting content in the edit page automatically pad that cell even if the css limits padding?
The custom css is (NB, I’m just trying to get the first section header rounded initially before I clone the css to the other headers):
.wp-table-reloaded-id-1, .wp-table-reloaded-id-1 td, .wp-table-reloaded-id-1 th { border: 0px!important; border-collapse: collapse!important; border-spacing: 0px!important; } .wp-table-reloaded-id-1 .row-2 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .row-7 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .row-11 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .row-15 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .row-19 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .row-23 td { background-color: #111226!important; font-size: 14px!important; color: #ffffff!important; height: 7px!important; } .wp-table-reloaded-id-1 .column-1 { width: 7px!important; } .wp-table-reloaded-id-1 .column-4 { width: 7px!important; } .wp-table-reloaded-id-1 .row-1 { height: 7px!important; } .wp-table-reloaded-id-1 .row-2 { height: 7px!important; } .wp-table-reloaded-id-1 .row-3 { height: 7px!important; }Hi,
first, as a note: I would actually not recommend using a table for such a round corner effect, you are better of with using CSS on a
<div>for this. (Unfortunately, the relevant CSS is not yet supported in all browsers, but that’s definitely a better way in my opinion.)Now, if you still want to achieve this in WP-Table Reloaded, that should indeed just be a matter of fixing your CSS.
I can’t check your site unfortunately, as the preview is not available to non-logged-in users, so if possible, please “publish” that test page.
Just as a try: I can’t see any CSS in your code that removes the padding and margins, so please try adding this:
.wp-table-reloaded-id-1, .wp-table-reloaded-id-1 td, .wp-table-reloaded-id-1 th, .wp-table-reloaded-id-1 img { margin: 0!important; padding: 0!important; }This also removes padding around images, that your theme might have added.
Regards,
Tobiashttp://www.whichplm.com/temp/test-table.html
I’ve included your suggested code… but still borders/padding?
Hi,
thanks for the link to the test table.
Now only a small part is missing from my code (due to combining the CSS, you did not copy all of it).
Please add the following CSS, which will remove borders and padding around the images:.wp-table-reloaded-id-1 img { margin: 0!important; padding: 0!important; border: none!important; }Regards,
TobiasTobias
Many thanks… works great. Final question, how can I make the second row smaller so the overall rounded header doesn;t look so fat? Through CSS I;ve tried to force a row height but it doesn’t seem to make any difference?
Hi,
you need to change the “line-height”. For example, add
.wp-table-reloaded-id-1 .row-7 td { line-height: 11px!important; }Regards,
TobiasTobias
Thanks..worked a treat. Now I have rounded tables!
Can I ask, my initial understanding of the tables reloaded was a ‘define once’/’use many’ i.e so you setout the layout of the tables through a table ID and CSS and then you can create many different instances of the same table but with different content.
However I think each table must be unique from my use/experience of the plugin, in which case I need to change each CSS definition to reference a list of table ID’s. Is that possible, say,
.wp-table-reloaded-id-1 .row-7 td { line-height: 11px!important;}
.wp-table-reloaded-id-1|2|3|4|5|6|7 .row-7 td {
line-height: 11px!important;
}Hi,
thanks for the question.
That understanding is almost correct, except for the “different” content part 🙂
What you describe is more of a concept of “table layout classes”. I have something in mind for the future (to make styling easier), but currently I don’t have the time to implement it.
You can however achieve something like this with the new “custom table CSS class” feature of WP-Table Reloaded 1.9.1:
Instead of.wp-table-reloaded-id-1|2|3|4|5|6|7as you suggest, you would use something like.wp-table-reloaded-round-corners(that’s free to choose). Then, all you need to do, is to addwp-table-reloaded-round-corners(without the period at the beginning, which is only used in the CSS code itself)
to the “custom CSS class” textfield on the “Edit” screens of tables 1, 2, 3, 4, 5, 6, and 7 (or whatever tables you want to style like this).Best wishes,
TobiasSo if I placed all the CSS from the custom CSS commands section (as setout about) from the plugin section into a new wrapper definition as you describe, that should allow me to simply declare that new wrapper definition on the custom CSS of each table?
But all the CSS code specifically relates to a table ID? Do I need to drop ID-1 from each css styling and leave it general i.e.
.wp-table-reloaded-round-corners { .wp-table-reloaded<strike>-id-1</strike> img { margin: 0!important; padding: 0!important; border: none!important; } .wp-table-reloaded<strike>-id-1</strike> .row-7 td { line-height: 11px!important; }Hi,
no, this won’t work that easy, unfortunately. You will need to rewrite it like this:
.wp-table-reloaded-round-corners img { margin: 0!important; padding: 0!important; border: none!important; } .wp-table-reloaded-round-corners .row-7 td { line-height: 11px!important; }So, all ID based code that belongs to the rounded corners styling need to have
.wp-table-reloaded-id-1changed to.wp-table-reloaded-round-corners.
And then all tables that shall get rounded corners styling need to getwp-table-reloaded-round-cornersin the “Custom CSS class” field on their “Edit” screens.Regards,
Tobias
The topic ‘[Plugin: WP-Table Reloaded] How to put image background.’ is closed to new replies.