SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question HTML Question - Border Color ???

    Let's say I have a an image, I want to add a border around it (as I have, "border=1" ) , how do I add a border color? The code below of

    border-color

    is not working
    <img src=31a.jpg border=1 border-color=white>
    How do I set up a border color?

    In my HTML book, I see under border color the following:

    border-color

    P { border-color: green }

    I'm sure this is basic and simple, but I can't seem to find the border-color command.

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well there's no way to change border-color without CSS combined with HTML. You're halfway there. The notation you see is CSS but you can do what's called inline CSS as well. Here's how:
    Code:
    <img src="31a.jpg" border="1" style="border-color: white">
    BTW, always use quotes around attrbiutes.

    Alternatively you can do CSS by putting the style in <style> tags inside your <head>:
    Code:
    <head>
       <style type="text/css">
        // defines image class with border width, style and color
        .definedimage {borders: 1px solid white;}
        </style>
    </head>
    <body>
      <img src="31a.jpg" class="definedimage">
    </body>
    Theres a third way but it's unimportant for this thread.

    Hope that helps.
    Aaron
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thanks, I posted on EMD, CLF, GeekVillage, and today, sitepoint got me the answer the quickest.

    http://forums.craigslist.org/?ID=3133462

    http://www.geekvillage.com/forums/sh...&postid=109942

    http://www.emailaddresses.com/forum/...=&postid=68960


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
  •