views:

750

answers:

2

how do I display the gridlines in a HTML table? (am using IE6)

+2  A: 

Via css. Put this inside the <head> tag.

<style type="text/css" media="screen">

table{
border-collapse:collapse;
border:1px solid #FF0000;
}

table td{
border:1px solid #FF0000;
}
</style>
pixeline
Use <style type="text/css"> instead.
MysticEarth
the border-collapse on tds is superfluous (and in fact not standard).
Boldewyn
true, i stand corrected.
pixeline
one more question - how do I make the vertical lines solid, and the horizontal lines dashed?
Bazil
border-left: 1px solid black;border-right:1px solid black;border-bottom:1px dotted black ( or dashed)
pixeline
A: 
<table border="1"></table>

should do the trick.

slugster
Should work, but it's better to separate content and design (content in html, design in css, where border is design.
MysticEarth
Agreed, but sometimes it's ok to bend the rules a little too :)
slugster