www.webdeveloper.com
Results 1 to 6 of 6

Thread: Image border colour

  1. #1
    Join Date
    Jun 2006
    Posts
    17

    resolved [RESOLVED] Image border colour

    I want to have a border surrounding a graphic, however, I want to make it a colour other than black. Anyone know how to do this? I can't seem to figure it out.
    Last edited by Googs62; 07-06-2006 at 10:46 AM.

  2. #2
    Join Date
    Jun 2006
    Posts
    263
    bordercolor="#anycolor"

  3. #3
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287
    HTML Code:
    <head>
    <style type="text/css">
    img{border:#FF0000;}
    </style>
    </head>
    My settings

    Browser :: FireFox 1.5
    Resolution :: 1152x864
    Connection :: Cable Modem 2Mbs

  4. #4
    Join Date
    Jun 2006
    Posts
    17
    Ok, neither of these things worked.

    <head>
    <style type="text/css">
    img{border:#FF0000;}
    </style>
    </head>

    I have this in my code at the top of the page between the <HTML> and <BODY> tags. For example:

    <HTML>
    <head>
    <style type="text/css">
    img{border:#FF0000;}
    </style>
    </head>
    <BODY>

    I feel that perhaps I am not placingthis correctly. Should I be placing this somewhere different?

  5. #5
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287
    No, leave it where you placed it, I just forgot a little bit of code. This will apply this to all images
    HTML Code:
    <head>
    <style type="text/css">
    img{border:solid 1px #FF0000;}
    </style>
    </head>
    Or To apply to certain images, use the class attribute like this:
    HTML Code:
    <head>
    <style type="text/css">
    .imgborder{border:solid 1px #FF0000;}
    </style>
    </head>
    <img class="imgborder" src="img.jpg">
    My settings

    Browser :: FireFox 1.5
    Resolution :: 1152x864
    Connection :: Cable Modem 2Mbs

  6. #6
    Join Date
    Jun 2006
    Posts
    17
    Perfect, thank you so much!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles