How to set a cell border

I want to know how to set a border of a specific cell of a table?
I know that it's possible to use style for IE, but don't know for NS. Can anyone give me a solution that can be for both NS and IE?
hcyuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GnissmanCommented:
For some strange reason NS won't display the borders you declared in a style that goes with a <td>-tag. But it does work if you put the whole content of that cell in a <p> and apply the style to that:

<td>
  <p style="border-width:medium; border-color:#FF9999; border-style:dotted">
  Hallo World!
  </p>
</td>

This works fine in both IE and NS!

Gniss
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hcyuAuthor Commented:
Yes, it works, but it will expand my cell width, that makes the table to be irregular. Any amendments for that? Thanks!
0
GnissmanCommented:
No, I am sorry. I haven't found a way to avoid that yet. Maybe setting the margin to 0 would help?

Something like <p style="margin:0mm;">

Haven't tried that yet, though.

Gniss
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

hcyuAuthor Commented:
Yes, it works, but it will expand my cell width, that makes the table to be irregular. Any amendments for that? Thanks!
0
GnissmanCommented:
No, I am sorry. I haven't found a way to avoid that yet. Maybe setting the margin to 0 would help?

Something like <p style="margin:0mm;">

Haven't tried that yet, though.

Gniss
0
GnissmanCommented:
I was just notified that you added a comment, but instead of that *my* last comment has been duplicated.

If something was lost, please repost your comment

Gniss :o)
0
hcyuAuthor Commented:
I found that using <div> inside the <td> can do so!!
0
GnissmanCommented:
Great! So <td><div style="">.. will do the trick, eh?
Gniss
0
hcyuAuthor Commented:
I found that using <div> inside the <td> can do so!!
0
hcyuAuthor Commented:
Thanks for your insight, anyway! : )
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.