Can’t gid rid of table borders
I’m using <table border=”0″ cellpadding=”5″ cellspacing=”5″ width=”100%”> to create a table with no borders. But I’m still getting borders as if I had used border=”1″. I suspect that I’m overlooking something simple, but can someone tell me what I’m doing wrong?
The blog I need help with is iwanticewater.wordpress.com.
In case you’re wondering, I’m using tables to get around the sloppy way WP handles text wrapping for images. The preview looks exactly as I imagined it, with the exception of those ugly border lines! Help please.
Can you paste the whole table code you’re using? (between backticks ` – – on the same key as tilde ~)
Can you detail what you find sloppy about text wrapping? I use lots of tables, so it may be that I’ve not noticed a problem.
The post has several tables, which are used to lock text to a photo:
<table border="0" cellpadding="5" cellspacing="5" width="100%"> <tr> <td style="vertical-align:middle;"><a href="http://iwanticewater.wordpress.com/files/2009/11/are-you-kathlick-09.jpg"><img src="http://iwanticewater.wordpress.com/files/2009/11/are-you-kathlick-09.jpg" alt="" title="Are You Kathlick 09" width="300" height="160" class="aligncenter size-full wp-image-4373" /></a></td> <td style="color: teal; font-size: 22px; line-height:1.1em; text-align:center; vertical-align:middle;"><strong>"I think it means we're Pisskopailians!"</strong></td> </tr> </table>
Maybe I’m just not good at it, but getting the images and text positioned and formatted the way I want is so much easier with tables than with the image text wrapping feature. My post has seven like this, with the positions of the text and images alternating.
Is it possible that the INove theme I’m using overrides the border=”0″ setting?
Not sure if it works but let’s try:
<table style="border:1;visibility:hidden;" cellpadding="5" _any other details here_>
p.s I blog from mobile so excuse my flaw or just simply wait for other volunteers’ workaround(s) say, Panos, TSP, devblog — to name a few.
Thanks. I’ll try that.
Sorry, but that hides the entire table.
I decided to publish “as is” because the post was meant for Sunday. I’ll gladly edit it to get rid of the borders if someone can show me how.
Seems the problem is related to iNove. In other themes the borders are not visible. Also the text and image valign in the middle, but iNove seems to over-ride.
This code hides the iNove borders with a white border around the table and around the td with the image.
<table style="border:solid 2px #ffffff;" border="0" cellspacing="0" cellpadding="2" width="440" align="center"> <tbody> <tr> <td style="border:solid 2px #ffffff;padding-right:.5em;" valign="middle"><a href="http://iwanticewater.wordpress.com/files/2009/11/are-you-kathlick-09.jpg"><img class="aligncenter size-full wp-image-4373" title="Are You Kathlick 09" src="http://iwanticewater.wordpress.com/files/2009/11/are-you-kathlick-09.jpg" alt="" width="300" height="160" /></a></td> <td style="padding-left:.5em;" valign="middle" align="center"><span style="color:teal;font-size:22px;line-height:1.1em;"><strong>"I think it means we're Pisskopailians!"</strong></span></td> </tr> </tbody></table>
@ 1tess: Thanks! I understand changing the border color in the table definition (I’d thought of that, but didn’t know how), but is it needed in the first data statement? If so, why not the second? Also, I don’t get the other changes. Some I can see better coding, but some seem unnecessary, like changing the width of the table.
I put the border on the td with the image, but I suppose you could put it with the text td.
It appears you only need the one statement. If you don’t use it, you get a small vertical line dividing one td from the other.
As I said, it seems that iNove has CSS or something that over-rides what happens in the other various themes I tried in my test blog. They did not need the white border…
I like to define the width of a table rather than use %, but I believe you can do either. Perhaps % is better than specific # in flex width themes? (440 is max width for images in iNove)
the cell spacing etc. was just an artifact of a table i was fooling with when i started on your question: change as you like. I started with a basic table that I use regularly, so that would account for the differences.
The key in my code is adding the white borders (ffffff=white if you like that better) to hide iNove’s quirks.
Hope this works for you…
Using just the color statements (I did have to put in in the first data statement as well), worked perfectly. Thanks!
INove supports image widths up to 600 I think, but I try not to exceed 500 to allow for the use of at least a few of the other themes. :-)
Also, after some thought I remembered that using the align statements the way you suggested didn’t work in a different post. I’m not sure why. The code I’m using was suggested as a work-around for that problem. Another theme issue?
Thanks again! Another bit o’ knowledge to help with future posts!
I admit that iNove is a theme I’ve not looked at much. so could be theme related.
Ack—right iNove = 600 max!
re the align statements, I think you are correct. I was switching between answering your question while working on my own stuff and other things.
So, you are satisfied? and if so, then good…
Very much so! Thanks.
Alternative solution: change
and add border:none to the td tag style declarations as well.
Your problem was actually the same one you had asked about here:
As husdal explained in that thread, align=, border= etc. are dropping out of use. Apparently iNove accepts the “new” way only.
“border:none;” [slaps forehead]
And now I see where “vertical-align:middle;” came from!
Yup, ’twas me… And I’m afraid that means some updating in my posts too…
text and images (or whatever)?
The topic ‘Can’t gid rid of table borders’ is closed to new replies.