homepage Welcome to WebmasterWorld Guest from 54.211.219.178
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
CSS in Dreamweaver MX
Styling a Table's Borders?
cyberfyber




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

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




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

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




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

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




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

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




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved