...

View Full Version : Removing a line between rows



Devaspora
11-11-2009, 02:01 AM
<style type='text/css'>

td.title
{
height: 354px;
width: 844px;
vertical-align: bottom;
border-collapse: collapse;
}

td.body
{
border-collapse:collapse;
height:600px;
vertical-align:middle;
background-image:url(images/body.png);
}

body
{
background-color:#FFF;
background-image:url(images/bg4.jpg);
background-repeat: repeat;
}
</style>

<script language="JavaScript" type="text/javascript"><!--

var image = new Array();

image[0] = 'images/top1.png' ;
// image[1] = '' ;
// image[2] = '' ;
// image[3] = '' ;
// image[4] = '' ;

var index = Math.floor(Math.random() * image.length);
document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>');
//-->
</script>


</head>



<body>
<center>
<table width="844">
<tr>
<td class='title'></td>
</tr>
<tr>
<td class='body'></td>
</tr>
<tr>
<td height="200"></td>
</tr>
</table>
</center>
</body>
</html>

Alright, why do I get a line between the first two rows? I googled this many times but nothing seems to be working for me.

abduraooft
11-11-2009, 08:38 AM
Try adding attributes cellpadding="0" and cellspacing="0" to your table.

PS: Add a proper DOCTYPE (http://www.alistapart.com/articles/doctype/)to your document (if you don't have one) and validate your markup (http://validator.w3.org/#validate_by_input).

Devaspora
11-11-2009, 04:25 PM
It has been validate and everything is fine. But your trick didn't work for me abduraooft...

bazz
11-11-2009, 04:29 PM
you have a link to the page?

abduraooft
11-11-2009, 04:34 PM
The following works for me :confused:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type='text/css'>

td.title
{
height: 354px;
width: 844px;
vertical-align: bottom;
border-collapse: collapse;
}

td.body
{
border-collapse:collapse;
height:600px;
vertical-align:middle;
background-image:url(images/body.png);
}
td{
border:1px solid red; /* just to see that space*/
}
body
{
background-color:#FFF;
background-image:url(images/bg4.jpg);
background-repeat: repeat;
}
</style>

<script language="JavaScript" type="text/javascript"><!--

var image = new Array();

image[0] = 'images/top1.png' ;
// image[1] = '' ;
// image[2] = '' ;
// image[3] = '' ;
// image[4] = '' ;

var index = Math.floor(Math.random() * image.length);
document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>');
//-->
</script>


</head>



<body>
<center>
<table width="844" cellpadding="0" cellspacing="0">
<tr>
<td class='title'></td>
</tr>
<tr>
<td class='body'></td>
</tr>
<tr>
<td height="200"></td>
</tr>
</table>
</center>
</body>
</html>

PS: Are you using tables to layout your page? If so, know why it's very bad from www.hotdesign.com/seybold/

Devaspora
11-11-2009, 04:36 PM
No, I dont currently have it up but here is a snapshot of it

http://img682.imageshack.us/img682/8263/spaceh.png

Devaspora
11-11-2009, 04:44 PM
The following works for me :confused:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type='text/css'>

td.title
{
height: 354px;
width: 844px;
vertical-align: bottom;
border-collapse: collapse;
}

td.body
{
border-collapse:collapse;
height:600px;
vertical-align:middle;
background-image:url(images/body.png);
}
td{
border:1px solid red; /* just to see that space*/
}
body
{
background-color:#FFF;
background-image:url(images/bg4.jpg);
background-repeat: repeat;
}
</style>

<script language="JavaScript" type="text/javascript"><!--

var image = new Array();

image[0] = 'images/top1.png' ;
// image[1] = '' ;
// image[2] = '' ;
// image[3] = '' ;
// image[4] = '' ;

var index = Math.floor(Math.random() * image.length);
document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>');
//-->
</script>


</head>



<body>
<center>
<table width="844" cellpadding="0" cellspacing="0">
<tr>
<td class='title'></td>
</tr>
<tr>
<td class='body'></td>
</tr>
<tr>
<td height="200"></td>
</tr>
</table>
</center>
</body>
</html>

PS: Are you using tables to layout your page? If so, know why it's very bad from www.hotdesign.com/seybold/


Thank you for this informative page, but this page I am designing now I just want to finish up. Any other sugesstions?

Devaspora
11-11-2009, 05:44 PM
Actually I solved the problem by using DIV and IDs with my work. Thank you for all your help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum