Getting rid of "bordercolor" atrribute

  Handy Spinner 13:06 17 Jan 2005

Finally I've started redesigning my website's coding, and I'm going for the W3C HTML 4.01 Transitional standard, and also cross-browser testing!

Trouble is, I've got everything else right, but I found out "bordercolor" is an IE-only attribute. So what can I do to replace it while getting the same effect? I want all the lines (i.e. outer border and between cells) in my tables to be a specific colour. I'm also using external CSS (validating that using the W3C validator as well).

Help would be much appreciated.

Handy Spinner

  Talented Monkey 14:50 17 Jan 2005

If you are using style Sheets then you should not have any style attributes what so ever in your main html, otherwise whats the point in having CSS?

In CSS there are plenty of attributes for tables and other containers you can give a container any number of borders, dotted, dash solid double border, along with any colour you fancy. You can even specify top left right bottom borders, having a seperate look for each side of your table!

take a look at the following from w3schools click here all border properties are lsited with examples.

  Handy Spinner 15:12 17 Jan 2005

I didn't say I was using style attributes in my main html. I know that there are loads of attributes as you describe, however specifying borders in that way only affects the outer borders, as far as I can see, and I haven't had much luck in solving it with using td{ blah }, etc.

Basically, I want the inner borders to be changed as well as the outer ones, as does IE "bordercolor".

  Talented Monkey 16:42 17 Jan 2005

" bordercolor "is indeed only works in IE, however this is only if you are calling it within its <table bordercolor="#00ff00">

border colours within style sheet is a different kettle of fish, border-color only effects the border of the container you are applying it to. if you want to have internal borders coloured you have to apply the border styling to the <td> tags too.

i assume you have in your style sheet somthing like

.bordertest {
border: 1px solid blue;
border-collapse: separate;
background-color: white;

then in your HTML

<table class="bordertest">
<td class="bordertest">

if this dosnt work then maybe you can just post the relevant bit of code and the css applied to it. you may have a stupid typo that prevents the style from being applied.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 Hack Latest News: How Secure is your Wi-Fi?

Photoshop CC 2018 released with new Curvature Pen and better brush tools

Best kids apps for iPhone & iPad

Comment utiliser Twitter ?