Borders using images

Discussion in 'HTML' started by Hvid Hat, Mar 17, 2008.

  1. Hvid Hat

    Hvid Hat Guest

    Hi

    I want to create a layout where the content is surrounded by a frame, kinda
    like a picture with a picture frame around it. My question is, how do I go
    about this? Is this done by using divs for each border (top, right, bottom,
    left) and giving the div a background image or is there a better way? In
    my case, I can use a repeating image for the border. I just can't use the
    same repeating image for all borders as the shadow for the borders differ.
    Hvid Hat, Mar 17, 2008
    #1
    1. Advertising

  2. Hvid Hat

    dorayme Guest

    In article <>,
    Hvid Hat <vil_ikke@have_spam.dk> wrote:

    > Hi
    >
    > I want to create a layout where the content is surrounded by a frame, kinda
    > like a picture with a picture frame around it. My question is, how do I go
    > about this? Is this done by using divs for each border (top, right, bottom,
    > left) and giving the div a background image or is there a better way? In
    > my case, I can use a repeating image for the border. I just can't use the
    > same repeating image for all borders as the shadow for the borders differ.



    <http://www.bigbaer.com/css_tutorials/css.border.image.text.box.st
    yles.htm> might get you going.

    --
    dorayme
    dorayme, Mar 17, 2008
    #2
    1. Advertising

  3. Hvid Hat

    cwdjrxyz Guest

    On Mar 17, 11:14 am, Hvid Hat <vil_ikke@have_spam.dk> wrote:
    > Hi
    >
    > I want to create a layout where the content is surrounded by a frame, kinda
    > like a picture with a picture frame around it. My question is, how do I go
    > about this? Is this done by using divs for each border (top, right, bottom,
    > left) and giving the div a background image or is there a better way? In
    > my case, I can use a repeating image for the border. I just can't use the
    > same repeating image for all borders as the shadow for the borders differ.


    You can build borders or frames around an image using many image tools
    such as Paint Shop Pro. The main disadvantage of this is when you want
    the image to be of near full page size, in which case the image bit
    size may become huge and be slow to download.

    Another way is to build a gif picture frame with an empty interior for
    content. I have a gold picture frame with empty interior at
    http://cwdjr.net/geometric/goldframe.gif . This is 800 x 600 px, but
    is only about 37 KB, which is fairly small for this size of image. By
    using percentages for height and width for the image, you can fill or
    nearly fill most page sizes commonly used without undue distortion of
    the image frame. For some unknown reason, this gets the most hits on
    my .net site. I don't use it much on my pages, and the few pages on
    which I do use it don't get many hits, so I can only assume a lot of
    people are hot linking to it. So far I have had no bandwidth usage
    problems, but if I do or just wake up in a very bad mood, the frame
    image will be renamed and perhaps replaced with something rude. So you
    are welcome to even hot link to it for testing, but if you decide to
    use it please download it.
    cwdjrxyz, Mar 18, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George
    Replies:
    9
    Views:
    4,870
    George
    Oct 25, 2004
  2. Stuart Palmer

    Images with borders

    Stuart Palmer, Mar 27, 2006, in forum: HTML
    Replies:
    1
    Views:
    390
    Steve Pugh
    Mar 27, 2006
  3. Replies:
    13
    Views:
    651
  4. cera
    Replies:
    1
    Views:
    1,244
    Neredbojias
    Aug 18, 2007
  5. Douglas Shearer

    RMagick: Round corner borders on images.

    Douglas Shearer, Jan 8, 2007, in forum: Ruby
    Replies:
    2
    Views:
    174
    Douglas Shearer
    Jan 9, 2007
Loading...

Share This Page