Table borders

M

Michael Bartos

How do you hide table borders in css when you have made them more than 0px
wide?

Thanks,

Michael Bartos
 
D

dorayme

"Michael Bartos said:
How do you hide table borders in css when you have made them more than 0px
wide?

Thanks,

Michael Bartos

Make them the same colour as the background.

Mostly, you might be wanting to do this somewhat-shady no-good
low-down thing because you have not used enough margins or
padding on the table or table cells. (But I did have a very very
puzzling case where I could not solve a margin problem without
using this trick, it might not have been on a table... I forget,
I think it involved a float too?)
 
M

mbstevens

dorayme said:
Make them the same colour as the background.

Mostly, you might be wanting to do this somewhat-shady no-good
low-down thing because you have not used enough margins or
padding on the table or table cells.

Maybe not always so shady. You might just want the color to change on
hover or the like. Transparent and inherit are also possible for border
color, and might avoid your having to reset it when you change a
background color.
http://www.w3.org/TR/REC-CSS2/box.html

There are supposed to be some IE problems with transparent border color,
though, requiring a bizarre hack, according to this site:
http://www.hedgerwow.com/360/dhtml/css-ie-transparent-border.html


(But I did have a very very
 
M

Michael Bartos

Thanks, Dorayme.

-Michael


dorayme said:
Make them the same colour as the background.

Mostly, you might be wanting to do this somewhat-shady no-good
low-down thing because you have not used enough margins or
padding on the table or table cells. (But I did have a very very
puzzling case where I could not solve a margin problem without
using this trick, it might not have been on a table... I forget,
I think it involved a float too?)
 
M

Michael Bartos

Thanks. Very interesting!

-Michael


mbstevens said:
Maybe not always so shady. You might just want the color to change on
hover or the like. Transparent and inherit are also possible for border
color, and might avoid your having to reset it when you change a
background color.
http://www.w3.org/TR/REC-CSS2/box.html

There are supposed to be some IE problems with transparent border color,
though, requiring a bizarre hack, according to this site:
http://www.hedgerwow.com/360/dhtml/css-ie-transparent-border.html


(But I did have a very very
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top