View Full Version : Border lines?

03-05-2007, 08:26 PM
Newbie question:
What is the best looking way to create a border outline to outline certain boxes in a table? I want clean, narrow (1 pixel) border lines. Should I create a line image in Photoshop and drop the image into the table or create a 1 pixel width column and use a background color to create the line?


03-05-2007, 08:55 PM
Welcome to the forums dsnyder!

If it is for a table cell, you can do it inline in the tag like this:
<td style="border: 1px solid black;">content here </td>

If you want it done on more than one TD cell, you should probably make a CSS class instead. Let me know if this is what you're wanting.

03-06-2007, 02:08 AM
Thanks for the welcome and help!

That code works wonderfully. I’d actually like the color to be something other than black like #999999. What is the best way to have that happen? Replacing ‘solid black’ with #999999 didn’t do it. I clearly know nothing about coding. Thank for the quick help!

Also, the plan is to have three TD cells bordered this way and then the page would be used as a template throughout the site. So, CCS class it?

03-06-2007, 09:30 AM
<td style="border: 1px solid #999999;">content here </td>

will change the color

when ur unsure about a element property, always check the available properties of it on w3c. its a big help

03-06-2007, 01:49 PM
Chris is right on, replace 'black' with whatever color you want.
I clearly know nothing about coding. That at least is very fixable ;)

03-06-2007, 02:50 PM
Lovely and simple. Thanks.

03-06-2007, 02:58 PM
What about the issue that DW brings up in the Target Browser Check regarding this code?

It says: “Border properties generally do not render well (or at all) and can make some elements, including hyperlinks, unusable. (Netscape Nav 4.0)

Should that mean something to me?

03-06-2007, 04:30 PM
Yes it should, because eventually you have to learn about CSS and browser support. But that can come later :)
For now I think you can disregard that warning, hardly anyones uses NN4 anymore.