SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot pony's Avatar
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    image border class

    I'm having trouble setting a class to allow me to give images a border of 7 pixels

    img.border7 {
    border-width : 7;
    }

    Why is this not working with <img src="foo.jpg" class="border7" /> ?
    the bottoms of my shoes are clean from walking in the rain

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You define a border like so:

    .border7 {
    border: 7px;
    border-style: solid;
    }

    call it like so:

    <img src="foo.jpg" class="border7" />

    YOu have to TELL the browser that there is actually a border in addition to telling it how wide the border will be.

    By the way, you might consider leaving off the img part. That way you can use that class on any other element as well.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Zealot pony's Avatar
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Creole. That's about the only irritating thing about separating style from content. Some things that were so simple before are a bit more complex.
    the bottoms of my shoes are clean from walking in the rain


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
  •