SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: image borders

  1. #1
    SitePoint Enthusiast Monkeyboy's Avatar
    Join Date
    May 2001
    Location
    England, UK
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question image borders

    I'm pretty sure you can do this with style sheets but I'm not sure how.

    I want to alter the colour and thickness of the default border found in the HTML image tag as follows...

    Code:
    <img src="image" border="1">
    So instead of the icky blue border, I want something different. Is there a way to do this with CSS?
    Monkeyboy

  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure:

    Code:
    img
      {
      border-color:#foo;
      border-width:1px;
      border-style:solid;
      }
    
    or shorthand:
    
    img  {border:1px solid #foo;}
    HTH

  3. #3
    <C²: web standards /> cybercodeur's Avatar
    Join Date
    Dec 2001
    Location
    Montréal
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ... Where #f00 stands for #ff0000; (red).

    Your border can be many things among which solid, dashed and many others.

    Look into any CSS reference for more details. You 'll be glad you did!
    Denis Boudreau <C²/> - Web Standards & Accessibility
    [+] ICQ number: 115649885 || Email: denis@cybercodeur.net
    [+] Daily Weblog on Web standards and accessibility : CYBERcodeur.net

  4. #4
    SitePoint Enthusiast Monkeyboy's Avatar
    Join Date
    May 2001
    Location
    England, UK
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help!
    Monkeyboy


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
  •