right border

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

right border

Post by shiznatix »

Ok I have a table with this code

Code: Select all

<div style="padding: 1px;">
  <table border="0" width="100%" bgcolor="" class="ridamust">
    <tr>
      <td width="70%">
        <div style="height: 100%; border-style: solid; border-color: #F0D5AB; border-right-width: 1px; border-top-width: 0; border-left-width: 0; border-bottom-width: 0;">
          <span class="data">
            Andrew 22:58 Mar 07 Tuesday, 2006
          </span>
          <br>
            testing123
        </div>
      </td>
      <td align="left" width="30%">
        Happy Man
      </td>
    </tr>
  </table>
</div>
What I want is to get that border to go the whole way from the top of the <td> to the bottom to make a nice small divider between the 2 <td> tags. What is happening is the border starts about 2 pixels from the top of the <tr> and ends like 10 pixels from the bottom. I have tried everything and I am all out of ideas.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Looks alright to me in IE6 and FF 1.5.0.1

Unless i didn't undertsand yor problem!?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

ok i cant send a screen shot because this computer is worth less than my shirt but i will try to draw a picture...remember I want the border bar thing to be the same height as the table row. Basically I want a 1 or 2 pixel divider between the 2 <td> tags that seperates them from eachother entirley. Like I do not want the <td>'s to 'touch' eachother at all.

here is what it looks like for me the || is the border that i am trying to make

Code: Select all

--------------------------------------------------------
| yada yada                             ||  yar anger  |
|  yada yada                            ||  yar anger  |
|  yada yada                                 yar anger  |
---------------------------------------------------------
notice how the || does not quite touch the top and how it is even farther from touching the bottom to make a complete divide. Thats my problem. Sorry if I am making this difficult but you know how it goes somtimes.
Last edited by shiznatix on Wed Mar 15, 2006 7:46 am, edited 1 time in total.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

This is what i see

Image
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

hummmm after further testing I dont know. There is still the 2 gaps there. Put some backgroud color to that table and to those <td>'s and maybe it will do it for you too. if not then maybe the </div> is putting a extra line underneith it before the </td>??? I dont get it.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

when i set the table BG colour, i get a small 2px-ish gap at top and bottom.

To rectify the problem, i just changed the cellpadding and cellspacing to zero
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Ya, setting the cellspacing to 0 should fix it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

doing cellpadding="0" cellspacing="0" fixes the problem for the top gap but does nothing to fix the problem of the bottom gap (which is the biggest gap). Any other ideas? I can't leave this bar until I figure this out
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

HAHAHA no your right it does work just fine. what made it not work was the extra <tr><td colspan="2">&nbsp</td></tr> that i put at the end that I was not even paying attention to. Wow I need to relax a little. Thanks for the help.
Post Reply