images as borders

This is a discussion on "images as borders" within the Web Page Design section. This forum, and the thread "images as borders are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 25th, 2007, 12:00
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
images as borders

Is there a way to put 2 images as the right and left borders of a website?

I am working on my website, and I was wondering if it was possible to use images as borders, or do I need to put two separate divs with images n them along the sides?
Reply With Quote

  #2 (permalink)  
Old Jun 25th, 2007, 12:07
SuperMember

SuperMember
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Pádraig
Re: images as borders

You could try float: left; and float: right;
Reply With Quote
  #3 (permalink)  
Old Jun 25th, 2007, 12:16
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: images as borders

You can do a lot with images as borders -- in fact, pretty much whatever you want to do -- but I have always found it useful to have the image in a separate div for control and standardization. Like, if you want to have a repeating background, you can put a tiny .gif or .png file as the background of a div.

Here's the only place I've done an extensive image border: The top of the box is an image with a transparent corner at the top left to let the background show through, and the drop shadow at the right and bottom are divs with images.

Like, the right drop shadow is done by using a background image for the div one pixel high that goes across the white box and then has the drop shadow. The box itself is actually a container div that includes all the drop shadows and some of the blue grid background:

http://www.dhreport.com/interactive_health/index.php

Code: Select all
.box_auto,.box_auto_text,.box_auto_white, .box_auto_text_white {
width:509px;
height:auto;
font:14px/16px Verdana,Helvetica,Trebuchet,sans-serif;
color:#0d2727;
margin:0;
padding:0;
}
.box_auto_white, .box_auto_text_white { background:
 url(./../images/box_bg_test.gif) top left repeat; }
Reply With Quote
  #4 (permalink)  
Old Jun 25th, 2007, 12:32
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: images as borders

Maybe I'd better explain a little better. There are at least three different ways to do left-right borders.

First, if it's a simple shadow or border, you can use an image, 1 px high and the width of the div, as the background of a div. Then you just use margins to keep the stuff inside the div from overlapping the image.

Second, you can have a container div, say you have "div.box { width: 500px;}". Then you can put three columns inside it: the left border div, with a width equal to the width of the left border image, floated left; the center column where the content goes, also floated left; and the right border div, as wide as the right border image, floated right. I'd suggest you don't set any left-right margins for the three interior columns. Then put your images in the two border divs and you're cooking.

Third, if you want something really fancy, just make one huge graphic the width of your div and set it as the background. This really doesn't need to be too terribly large, since the compression formats will make the single color in the center very cheap. This is the worst option (and really pretty noobish) due to the size of the file that will need to load, but the easiest from a css point of view.
Reply With Quote
  #5 (permalink)  
Old Jun 25th, 2007, 15:54
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,763
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: images as borders

Perhaps the simplest way would be to have two containing divs one with the background positioned left other right.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #6 (permalink)  
Old Jun 26th, 2007, 12:08
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Re: images as borders

Ok, thanks for the help. I'll see what I can do, and post the results when it is done!
Reply With Quote
Reply

Tags
border, css, image

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Div borders & different browsers djeyewater Web Page Design 0 Jan 6th, 2008 23:17
Anchor tags (and their borders) do not fit snugly around images in mozilla Borf Starting Out 13 Dec 7th, 2007 23:41
Help with div borders in FF, please? Donny Bahama Web Page Design 12 Apr 10th, 2007 20:09
borders benbacardi Web Page Design 2 Jun 4th, 2004 15:39


All times are GMT. The time now is 16:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43