Forum Moderators: not2easy

Message Too Old, No Replies

HELP PLEASE >> Tables on Opera and Mozilla

border is always dark

         

Nicky

6:22 am on Feb 19, 2004 (gmt 0)

10+ Year Member



I've got a table that on IE works fine. But on Mozilla and Opera the rows have a dark border.

I've tried changing the bordercolor but it makes no difference. Can anyone help me please:

$bgcolorlt="#F0F0F0";
$bgcolordk = '#5A76A5';
$brdcolordk="#999999";
$brdcolorlt="#F0F0F0";
<table align="center" class="norm" border="1" bordercolor=<?=$brdcolordk?> bgcolor=<?=$bgcolorlt?> width="222" cellpadding="2" cellspacing=1 >

<tr height='22' align='left' class='bizheading' bordercolor=<?=$brdcolorlt?> bgcolor=<?=$bgcolordk?>>
<td class="altcolor" colspan="2">Member Login</td>
</tr>
<tr bordercolor=<?=$brdcolorlt?> >
<td bordercolor=<?=$brdcolorlt?> >Username:</td>
<td bordercolor=<?=$brdcolorlt?>><input type=text name=username></td>
</tr>
<tr bordercolor=<?=$brdcolorlt?>>
<td>Password:</td>
<td><input type=password name=passwd></td>
</tr>
<tr bordercolor=<?=$brdcolorlt?>>
<td colspan=2 align=center>
<input type=submit value="Log in"></td>
</tr>
<tr bordercolor=<?=$brdcolorlt?>>
<td colspan=2><a href="forgot_form.php">Forgot your password?</a></td>

</tr>
<tr bordercolor=<?=$brdcolorlt?>>
<td colspan=2> Not a member? Join <a href="register_form.php">Now</a>:</td>
</tr>
</table>

grahamstewart

12:07 pm on Feb 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



bordercolor is not a valid atribute of the <tr> or <td> elements. Neither is bgcolor.
See the the section on tables in HTML Spec [w3.org] for confirmation.

Consider using CSS to style your table instead.

e.g.


td {
color: #000;
background-color: #5A76A5;
border: 1px solid #999999
}

Nicky

11:29 pm on Feb 19, 2004 (gmt 0)

10+ Year Member



Thanks for the tips. I tried using the CSS code you posted but again it made no difference on Mozilla - just IE changed.

Any other ideas?

SuzyUK

9:53 am on Feb 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the default table border
border="1"
in the HTML is not the same as css borders.. and it's that border you are seeing on everything but IE

if you change it to 0 it will disappear. Then if you also increase the cellspacing to 2 that should create the effect of the background color showing through similar to what you're trying to do with the light borders.

remove all the bgcolor and bordercolor properties as mentioned before

the table can then be given its "outline" border and background color using CSS

table#csst {border: 1px solid #999; background: #f0f0f0;}

and the bizheading's background should be changed by putting it onto the <td> instead of the <tr>

td.bizheading {background: #5a76a5;}

Suzy

Nicky

10:10 am on Feb 20, 2004 (gmt 0)

10+ Year Member



Wow, SuzyUK. Thanks Heaps. I'll try it tomorrow but it sounds like it'll work.