SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    UK
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    1px border..how?

    Could someone please explain to me how to make astyle sheet that I can add to my page, that will add a 1px border to a chosen cell? I only want to use it on some, andnot the whole page. I use topstyle lite, but to no avail

    Sorry for being such a newbie, but I'm trying to learn

    And maybe someone can show me an example? But I dont want to ask to much for my first post

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    What you can do is to specify a CSS class which you can then apply to an element of your choice. You do this by putting this in the head (between <head> and </head>) of your document.

    HTML Code:
    <style type="text/css">
      .withBorder { border: 1px solid black; }
    </style>
    You then use the class attribute to attach the class to an element.

    HTML Code:
    <div class="withBorder">a div with a black border</div>
    Yours, Erik.

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    UK
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thankyou so much Erik

  4. #4
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    There is another way you can do this which I forgot to tell you about.

    HTML Code:
    <div style="border: 1px solid black">a div with a black border</div>
    Yours, Erik.


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
  •