Welcome to WebmasterWorld Guest from 50.19.34.234

Forum Moderators: not2easy

Message Too Old, No Replies

CSS in Dreamweaver MX

Styling a Table's Borders?

     

cyberfyber

2:04 am on Jul 27, 2005 (gmt 0)

10+ Year Member



Hello,

Firstly, I'm using Dreamweaver MX

I've used CSS for several years now but now's the very first time I've ever considered applying it to tables.

I'm trying to come up with the same results for a table border as I would without the CSS.

To explain further, in regular formatting, I can get that sort of double border effect by simply entering in 1 for a border width and any number for CellSpace to increase the space inside of that border.

BUT, I just can't seem to get it done using CSS. Any ideas?

danmccarthy

2:40 am on Jul 27, 2005 (gmt 0)

10+ Year Member



I usually code CSS by hand, so I can't help you with the dreamweaver part, but this CSS will get you pretty close to "<table border=1>" in IE6 and Firefox:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
td {
border: 2px solid #C0C0C0;
}
table {
border-collapse: collapse;
}
-->
</style>
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
</table>
</body>
</html>

cyberfyber

2:51 am on Jul 27, 2005 (gmt 0)

10+ Year Member



Dang, the things I learn here.

Although, I have no problem getting a single border, it was the double border I was after. I suppose I can try to incorporate what you showed me into my external CSS file then try to take it from there.

Of course being lazy for so long by using Dreamweaver, I'll now need to learn how...hehehe.

Thanks bud.

danmccarthy

3:38 am on Jul 27, 2005 (gmt 0)

10+ Year Member



Oops. Missed the cellspacing bit. Need to learn to read carefully. The CSS changes a bit for that. This seems pretty close:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--

td, table {
border: 2px double #C0C0C0;
}
-->
</style>
</head>
<body>
<table width="600" border="0" cellspacing="5" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

cyberfyber

3:56 am on Jul 27, 2005 (gmt 0)

10+ Year Member



Doh!, just realised that should've been an easy adjustment even for me.

'Putting together a new site and would like to get it all right this time around.

Thanks again.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month