Borders using images

H

Hvid Hat

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.
 
D

dorayme

Hvid Hat said:
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.
 
C

cwdjrxyz

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,054
Members
48,769
Latest member
Clifft

Latest Threads

Top