SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    1px Table Border

    I need to create a table with 1px black borders.
    I found a way but is too complicated.
    Is there any other way to do this?

    PHP Code:
    <style type="text/css">
    <!--
    .
    border_all {
        
    border1px solid #333333;
    }
    .
    border_bottom {
        
    border-bottom-color#333333;
        
    border-bottom-stylesolid;
        
    border-bottom-width1px;
    }
    .
    border_left_right {
        
    border-left-color#333333;
        
    border-left-stylesolid;
        
    border-left-width1px;
        
    border-right-color#333333;
        
    border-right-stylesolid;
        
    border-right-width1px;
    }
    .
    border_left_right_bottom {
        
    border-left-color#333333;
        
    border-left-stylesolid;
        
    border-left-width1px;
        
    border-right-color#333333;
        
    border-right-stylesolid;
        
    border-right-width1px;
        
    border-bottom-color#333333;
        
    border-bottom-stylesolid;
        
    border-bottom-width1px;
    }
    -->
    </
    style>
    </
    head>

    <
    body>
    <
    table width="900" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" class="border_all">
      <
    tr>
        <
    td class="border_bottom">&nbsp;</td>
        <
    td class="border_left_right_bottom">&nbsp;</td>
        <
    td class="border_bottom">&nbsp;</td>
      </
    tr>
      <
    tr>
        <
    td>&nbsp;</td>
        <
    td class="border_left_right">&nbsp;</td>
        <
    td>&nbsp;</td>
      </
    tr>
    </
    table>
    </
    body>
    </
    html

  2. #2
    SitePoint Enthusiast Dabrowski's Avatar
    Join Date
    Apr 2006
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    .element {
    border: 1px #333 solid;
    }

    Just looked more at your code. You already have that simplified version in the first line.

    What is it you're trying to do? Can we take a look at the page that your CSS is used on so we can see what it looks like, then see if we can simplify it?

  3. #3
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can copy/paste the code in an .html file.

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <style type="text/css">
    <!--
    .
    border_all {
        
    width900px;
        
    border1px solid #333;
        
    border-collapsecollapse;
    }
    .
    border_all td border1px solid #333; }
    -->
    </
    style>
    </
    head>

    <
    body>
    <
    table class="border_all">
      <
    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

  5. #5
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Tyssen...
    It's working


Bookmarks

Posting Permissions

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