SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    uk
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    margin on a border?

    hi

    i have a div with a background image, this image shows an arrow on the left and a 1 pixel border top left and right.

    problem is when i add a matching border at the bottom of the div it runs along the whole div of course, whereas i want it to effectively start around 30 px from the left of the div to match the image.

    can i give a border a margin and adjust its width?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,321
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Could you post an image of what you are doing, or a link? It's not quite clear what's going on here.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,543
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by evvo1961 View Post
    hi
    can i give a border a margin and adjust its width?
    No you can't adjust a borders length because it does just what its name suggests and borders the element. You would probably need to use a smaller nested element to achieve the smaller border effect you want.

    However as Ralph said we may need to see exactly what you want to provide a better answer


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
  •