Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Table column border in HTML

Table column border in HTML

Scheduled Pinned Locked Moved Web Development
htmlquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cj4331
    wrote on last edited by
    #1

    using HTML can I set a left and right border to a cell or column in a table w/o setting a top and bottom border? I don't want a box around it. I want a vertical line to the left and right of it.

    B 1 Reply Last reply
    0
    • C cj4331

      using HTML can I set a left and right border to a cell or column in a table w/o setting a top and bottom border? I don't want a box around it. I want a vertical line to the left and right of it.

      B Offline
      B Offline
      Boro_Bob
      wrote on last edited by
      #2

      Yes, using CSS. Give your table an id for example id="MyTable" Then in your style sheet create a style for the columns in that table #MyTable td{ border-right:1px solid #CCC; border-left:1px solid #CCC; border-top:0; border-left:0; } You can replace the #CCC with which ever colour you want, and set the width of the border. You can also try 'dotted' or 'dashed' instead of 'solid'.

      Words fade as the meanings change, but somehow, it don't bother me.

      C 1 Reply Last reply
      0
      • B Boro_Bob

        Yes, using CSS. Give your table an id for example id="MyTable" Then in your style sheet create a style for the columns in that table #MyTable td{ border-right:1px solid #CCC; border-left:1px solid #CCC; border-top:0; border-left:0; } You can replace the #CCC with which ever colour you want, and set the width of the border. You can also try 'dotted' or 'dashed' instead of 'solid'.

        Words fade as the meanings change, but somehow, it don't bother me.

        C Offline
        C Offline
        cj4331
        wrote on last edited by
        #3

        Thanks!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups