Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member branwen's Avatar
    Join Date
    May 2006
    Location
    San Jose, California
    Posts
    7
    Member #
    13185
    I have a table where I can't seem to get rid of a pixel wide "border" (or margin) that's around it. The CSS code is for my table is:

    .content {
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
    width: 702px;
    background-color: #FFFFFF;
    border: none;
    color: inherit;
    padding: 0px;
    border-spacing: 0px;
    border-collapse: collapse; }

    I don't often use tables. Is there something I'm missing?

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Edit: Welcome to wdf

    I tried your code (with a table I created just for that purpose) and I got what was expected.

    I tested it in firefox 1.5.0.3, IE 6, and Opera 8.54

    The code I used was:

    HTML Code:
    <html>
    
    <head>
    
    <style type="text/css">
    
    .content {
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
    width: 702px;
    background-color: #FFFFFF;
    border: none;
    color: inherit;
    padding: 0px;
    border-spacing: 0px;
    border-collapse: collapse; }
    
    </style>
    
    </head>
    
    <body>
    
    <table class="content">
    	<tr>
    		<td>test td</td>
    	</tr>
    </table>
    
    </body>
    
    </html>
    What browser did you see this? Can we see your table code? Maybe you have a inline style on the <table> tag, as this would override the .content class

  4. #3
    Junior Member branwen's Avatar
    Join Date
    May 2006
    Location
    San Jose, California
    Posts
    7
    Member #
    13185
    Oop, nevermind, I figured it out. I needed to set the tr and td to
    margin: 0px;
    padding: 0px;
    border: none;

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Ah,

    Your table class (content) has no border.
    However just inside your table, you define a div with logo as it's class.

    The CSS for that class is
    HTML Code:
    .logo {
      position: relative;
      margin: 0px;
      height: 155px;
      width: 700px;
      background-color: #FFFFFF;
      border: 1px solid #4D607D;
      padding: 0px; color: inherit; }
    See the border line? That is your problem.

    Hope this helps.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:56 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com