View Full Version : Tables (with CSS) -- Border Problems
8-11-02, 09:09 PM
I'm getting so frustrated trying to create my own phpBB2 forumstyle for my website... Here's why:
When I try to make tables, with borders (using a css file for stuff like "border : 1px solid #abcdef"), they just won't show up like I want them to. This is what I want: do you see THESE forums? yes, the powweb forums, do you see those black lines? well, those are table-borders aren't they? HOW DO THEY DO THAT?
Each time I try something like that, I get this:
[edited: sorry, seems that the forum doesn't load the gif]
these are the links to the files:
Could someone help me? please?
I adjusted your css a bit, and nested tables:
is that the kind of thing you were talking about???
8-11-02, 09:59 PM
****, I accidentally created a new thread instead of replying here...
hm, lemme copy 'n paste
8-11-02, 10:00 PM
um, no, wasn't exactly what I wanted... um, like...
hm, hard to explain...
oh, yes, I know: http://nwn.bioware.com/forums/ follow this url, and there you'll see their forums, there! I want to have tables, just like their forums ;)
with borders that have a 1px width.
(horizontal borders AND vertical borders)
just like the ones on THESE (powweb) forums too!
Thanks for trying to help tho, appreciate it :)
----------- then -------------
<table border="1" border-color="black">
I'm pretty sure there's not a CSS rule for tables that works well.
----------- then -------------
I replied again:
err, that doesn't work, and if you just use <table border="1" other-attributes> it will show a border alright, but, not a "1pixel-width" border.
Here ya go..
W3 specs on tables (http://www.w3.org/TR/html401/struct/tables.html#h-11.3.1)
The border-color is an IE specific tag so I'm sure all the NS4x users will be complaining.
8-11-02, 10:09 PM
It really doesn't work, running winXP here, with ie6, and it shows this:
YES, you get borders, but NO, you don't get boders that are ONE pixel wide, and have a color.
8-11-02, 10:12 PM
you can view the source-code yourself, I don't see any tables that look like http://nwn.bioware.com/forums/
or tables that look like the powweb forums' ones
My mistake border-color was supposed to be bordercolor.. And you're right the border=0 doesn't set it to 1 pixel.
Are you happy now that I've corrected myself?
I gave you the W3 link for tables. Maybe you should look there for your table questions because as you have pointed out, my solution did not work.
I can't believe all the people that wanna code HTML but they don't even take the time to learn it. Moderators feel free to delete my participation in this thread.
that's the script I found the reference below.
8-11-02, 11:07 PM
Try this out
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<td bgcolor="#FFFFFF" width="175" valign="top" nowrap>
<td bgcolor="#FFFFFF" width="100%" valign="top">
8-12-02, 06:33 AM
Woohoo! Halfabee, you're the best!!!!
THAT was what I meant! thx thx thx!!!!
here's the result: http://www.dei-gaming.net/testing/__test02.html
for peps who want to see :)
I also noticed in your stylesheet you have the border tag on your td and table definitions. That will give you the double border. It depends, if you want ALL your td's to have a border, put the definition there and take it out of the table section, otherwise I find it's best to set the border for the table, then add style tags to the td's I want bordered. I use tables for layout a lot and I don't always want them to all have borders. :)
8-14-02, 10:40 PM
Shanti, since you seem to work with tables a lot, maybe you can help with this one. I'm inserting a picture into a table cell. The cell size is determined by the picture since the picture overrides any dimensional settings. The problem is that no matter what size I set the picture to, there is a space at the bottm between the picture and the border. Cellpadding is set to "0" and position commands have no effect. I've tried this with a simple, single cell table and the results are the same. Any suggestions?
I'm not Shanti, but I may be able to help:
my best guess is CELLSPACING="0" needs to be added in also..
8-14-02, 11:10 PM
Cellspacing is set to "0". I've also cropped the picture to make sure there was no border on it.
8-15-02, 06:02 AM
I've had that problem too, but, what I did was:
<table cellpadding="0" cellspacing="0">
<tr><td style="width : [width of picture in pixels]px; height : [height of picture in pixels]px;"><img src="picture" etc. etc.
and then, there will be no borders or whatsoever. additionally, you could just use a linked css file (that's how I use it actually).
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.