Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table border color in firefox

Status
Not open for further replies.

vasox56

Technical User
May 8, 2007
75
GB
quick question..

when you make a table and give it a border color, in internet explorer the border displays fine.

the firefox browser seems to add its own color to the border, a sort of grey shiney thing.

anyone come across this before and know how to get rid of it.
 
Hi

For example the below works in Mozillas, Opera, Safari and Explorer.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<style type="text/css">
table {
  border-style: double;
  border-color: red;
  border-width: 3px;
}
th {
  border-style: dotted;
  border-color: green;
  border-width: 2px;
}
td {
  border-style: solid;
  border-color: blue;
  border-width: 1px;
}
</style>
</head>
<body>
<table>
<tr><th>a</th><th>b</th></tr>
<tr><td>1</td><td>2</td></tr>
</table>
</body>
</html>
By the way, your HTML also validates, right ?

Feherke.
 
yeah.. i think the reason was because i was using old school table formatting.. such as valign, bgcolor.. etc

another thing.. is it possible to make a table border have a dotted outline..

like this..


..............

but with the dots much closer to each other?
 
I would bet vasox56 used proprietary IE html attributes called bordercolor and such to style their table border. Of course you can't expect IE specific properties to work cross-browser.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Dotted border will work (you will need to change the width in feherke's code to 1px if you want them to be very tight) but IE6 supports dots only if they are at least 2px wide. For 1px dotted borders IE6 will do dashes.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
i see.. thanks for that..

ill see what i can do and show you guys the results shortly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top