SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Can I make a border around a single cell in dreamweaver??

    Can I make a border around a single cell in dreamweaver?? , I mean I want to make a border around one cell only and not the entire table.
    Thanks for your help and God bless you

  2. #2
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can set a TD property say "border = 1"

    This will solve ur problem
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.

  3. #3
    Getting there... Willigogs's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    394
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vikrantkorde
    You can set a TD property say "border = 1"

    This will solve ur problem
    I actually don't think you can apply borders to TDs?

    Tables Yes - Cells No.

    However, an easy way of achieving this is to use a simple bit of CSS. Here's how you do it:

    Put this between your <head> Tags:

    HTML Code:
    <style type="text/css">
    <!--
    .cellborder {
    	border: 1px solid #FF0000;
    }
    -->
    </style>
    Then - go to your cell that you wish to apply a border to and add the following code:

    HTML Code:
    <td class="cellborder">
    Hey presto! that should do it! You can make the border thicker or thinner by changing it from 1px to whatever you like - and then the colour by changing the Hex code.

    Hope this helps!

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Willigogs
    I actually don't think you can apply borders to TDs?

    Tables Yes - Cells No.

    However, an easy way of achieving this is to use a simple bit of CSS. Here's how you do it:

    Put this between your <head> Tags:

    HTML Code:
    <style type="text/css">
    <!--
    .cellborder {
    	border: 1px solid #FF0000;
    }
    -->
    </style>
    Then - go to your cell that you wish to apply a border to and add the following code:

    HTML Code:
    <td class="cellborder">
    Hey presto! that should do it! You can make the border thicker or thinner by changing it from 1px to whatever you like - and then the colour by changing the Hex code.

    Hope this helps!
    Thanks, I will try it and see what happens
    God bless you

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It messed up my code
    It moved the cell to the right of the page and decreased its width?!!

  6. #6
    SitePoint Zealot gohankid77's Avatar
    Join Date
    Jun 2004
    Location
    United States
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is the problem with tables. Play with the width:

    .cellborder {
    border: 1px solid #FF0000;
    width: 20%;
    }
    Gohan (Mmm... Yummy!)

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I will try that, by the wya what do u think better designing with tables or what?? I find a lot of pain myself designing and adjusting tables

  8. #8
    SitePoint Zealot gohankid77's Avatar
    Join Date
    Jun 2004
    Location
    United States
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't use tables much, but I would have to agree with you. It is a HUGE pain designing and adjusting tables. That is why I'm trying to hurry up and learn more CSS so I can create a "table-less layout".
    Gohan (Mmm... Yummy!)

  9. #9
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree that there is no property as a border for the TD i was wrong.

    About usage of table, i will support this as that is the one of the way by which you can have ur page look good
    another way is u can go for DIV or SPAN tags.
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.

  10. #10
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can apply borders to table cells, not like border="1" or anything, but through css you can apply a border to just about anything except TR from my experience.

  11. #11
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can you apply border to table cells? I just tried the above css example and it messed up my code.

  12. #12
    Getting there... Willigogs's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    394
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Fido,

    Would you be able to provide a link / post the code of your example, as I can't understand how simply adding a border around a cell could throw out your code so badly.

    Maybe it's something very simple that I've overlooked?

    Chris


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
  •