Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing a line between rows

    Code:
    <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.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Try adding attributes cellpadding="0" and cellspacing="0" to your table.

    PS: Add a proper DOCTYPE to your document (if you don't have one) and validate your markup.
    Last edited by abduraooft; 11-11-2009 at 04:31 PM. Reason: typo :(
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It has been validate and everything is fine. But your trick didn't work for me abduraooft...

  • #4
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    you have a link to the page?
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    The following works for me
    Code:
    <!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>
    Edit:
    PS: Are you using tables to layout your page? If so, know why it's very bad from www.hotdesign.com/seybold/
    Last edited by abduraooft; 11-11-2009 at 04:39 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    New Coder
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, I dont currently have it up but here is a snapshot of it

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

  • #7
    New Coder
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    The following works for me
    Code:
    <!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>
    Edit:
    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?

  • #8
    New Coder
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually I solved the problem by using DIV and IDs with my work. Thank you for all your help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •