Jump to content

Cre8asiteforums Internet Marketing
and Conversion Web Design


Photo

Extra Space In Tables


  • Please log in to reply
9 replies to this topic

#1 tommr

tommr

    Light Speed Member

  • 500 Posts Club
  • 578 posts

Posted 23 December 2012 - 12:49 AM

I am trying to use some tables to arrange text and photos. For some reason wordpress is adding extra space.
Is there anyway to eliminate this space?
The blue section represents the image in the td and the green is ???
Posted Image
Here is my css.

.windchimes-table
{
  border-spacing:0;
  border-collapse:collapse;
padding:0 0 0 0;
width: 350px;
margin:0 0 0 0;
}
tr.windchimes {
padding:0 0 0 0;
margin:0 0 0 0;
  }
td.windchimes {
padding:0 0 0 0;
width:250px;
text-align: center;
  border-spacing:0;
  border-collapse:collapse;
vertical-align:top;
margin:0 0 0 0;
}
td.windchimes2 {
padding:0 0 0 0;
width:100px;
text-align: center;
  border-spacing:0;
  border-collapse:collapse;
vertical-align:top;
margin:0 0 0 0;
}

Thanks for looking

#2 tam

tam

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 2023 posts

Posted 23 December 2012 - 03:04 PM

Does your image have padding/margins assigned?

Anyway we can see the code online?

#3 tommr

tommr

    Light Speed Member

  • 500 Posts Club
  • 578 posts

Posted 23 December 2012 - 08:34 PM

I did not assign padding to the image so far as I know.
I thought there may be some thing in the wordpress css that was over riding these tables.


<table  class="windchimes-table">
<tr><td class="windchimes">
<a href="http://www.choicefavors.com/angel-chime-favors.htm" class="nav"><b>The Angel Windchime</b></a><br> is made up from 1 center angel with cutout heart surrounded by 4 more .
<br><br>
$5.75 Each
</td><td class="windchimes2">
<a href="http://www.chociefavors.com/angel-chime-favors.htm" class="nav"><img src="images/angel-windchime150.jpg" alt="angel-windchime150.jpg - 4.1 K" width=91 height=150 border=0></a>
</td></tr>
</table>


#4 DonnaFontenot

DonnaFontenot

    Peacekeeper Administrator

  • Admin - Top Level
  • 3702 posts

Posted 23 December 2012 - 09:07 PM

Try something like:

img { padding: 0; margin: 0 }

If the theme has placed padding or margins on images, this should override it.

#5 tam

tam

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 2023 posts

Posted 23 December 2012 - 09:12 PM

The td for the image is set to 100px but the image is only 91px, so the space left and right are the spare bits of the cell. If if you take the text out of the first cell does that fix the height of the image cell? That will stretch to accommodate the text.

It looks like you might have some spacing between the cells too, try setting cellspacing="0" in the <table> tag and see if that fixes it.

#6 tommr

tommr

    Light Speed Member

  • 500 Posts Club
  • 578 posts

Posted 23 December 2012 - 10:13 PM

I found this and it seems to make a difference.
I just hope it does not change anything else of importance.
#content tr td {
border-top: 1px solid #e7e7e7;
padding: 6px 24px;


#7 DonnaFontenot

DonnaFontenot

    Peacekeeper Administrator

  • Admin - Top Level
  • 3702 posts

Posted 23 December 2012 - 10:26 PM

Well, it will affect every table within the content section, but nothing outside of the content section.

#8 tommr

tommr

    Light Speed Member

  • 500 Posts Club
  • 578 posts

Posted 23 December 2012 - 10:33 PM

There are only a few tables I am using. I don't know what exciting surprises I am in for as I am not sure if wordpress uses any tables in the content area.
This is working out fine now although I will need to go back and do a little tweek for the ornament page.

Thanks for all the input.

#9 DonnaFontenot

DonnaFontenot

    Peacekeeper Administrator

  • Admin - Top Level
  • 3702 posts

Posted 24 December 2012 - 10:07 AM

WordPress itself does not use tables, so you don't need to worry about that.

#10 tommr

tommr

    Light Speed Member

  • 500 Posts Club
  • 578 posts

Posted 24 December 2012 - 11:24 AM

Thanks Donna,
Since I am only using tables to arrange 2 pages that contain a number of photos with text descriptions, arranged in rows, I should be good.
It is interesting to me that I can spend an hour trying to find a solution to a problem, but if I walk away and come back later, the answer can be simple.

Part of my problem is I am working with 2 laptop computers that are not exactly up to snuff and I spend an enormous amount of time just waiting for things to happen.
As it happens I had a good enough week on ebay and so I ordered a fresh machine. Not new but much faster and complete with my favorite xp.

Thanks again for the help, everyone.



RSS Feed

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users