Qbasicnews.com

Full Version: CSS question...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I have my borders set to 1px, and the cellpadding and spacing and stuff set to zero, but when I have two cels touching each other, the borders are right next to each other and make it look like one thick border. How do I cause this to now happen any more?
Make the borders the same color as the contents of the table cells.
(offtopic: how are the sprites coming along?)
I want the borders to have a black outline on them, though... but I only want the borders to be one pixel all the way around.

(offtopic: Hahah. I can't beleive I actually thought I was going to wake up at 4:00... Smile I'll get those sprites whipped up for you the instant I step into my house. And your game is going to have animated tiles also... and it won't be released without them, not while I'm around....Wink )
I'm not sure how to do it in CSS, but in straight HTML, you would use cellspacing=1 in the TABLE tag.
Quote:I'm not sure how to do it in CSS, but in straight HTML, you would use cellspacing=1 in the TABLE tag.

I have all my tables set at cellspacing=0 cellpadding=0, and it still doesn't work...
Then simply set border-right to 0px on every cell except the last one in the TR. For some reason, I was thinking you wanted a single pixel between the cells, hence why I suggested cellspacing=1.
Quote:I want the borders to have a black outline on them, though... but I only want the borders to be one pixel all the way around.

(offtopic: Hahah. I can't beleive I actually thought I was going to wake up at 4:00... Smile I'll get those sprites whipped up for you the instant I step into my house. And your game is going to have animated tiles also... and it won't be released without them, not while I'm around....Wink )
Hm, we need to talk about this animated thing...I'll catch ya on MSN when you get home.
hmm. i wrote something but i erased it. i see what you mean.
you'd have to define borders individually

make the first TD class="left" and for your .left style, set border-right to 1px and the other borders to 0px
and turn on only the borders you want. it's a lot of work in html.
so learn php and process tables automatically ;D
Uh...PHP won't help you with layout. :o
Wrong Zack, it's actually easier with PHP Wink

Anyway, I find it easiest to make tables have a cellspacing of 1, and set the background colour of the table to the border colour I want Wink

eg:

Code:
table {
  background-color: (backgroundcolour);
}

...

<table cellspacing="1">
  <tr>
    <td>Look at me!</td>
    <td>I'm a table with 1px borders!</td>
  </tr>
</table>
Pages: 1 2 3 4