/    Sign up×
Community /Pin to ProfileBookmark

Border Images?

Hello, I’ve been trying to learn how to take an image and use it to replace the standard border of something like a <div>. The basic command I’ve learned is

<border-(insert side left,right,top,bottom)-image>

But I can’t find anywhere that will show me a beginner friendly way of using it. Can anyone help me?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelFeb 13.2007 — I think CSS3 will let you use am image for a border. The future is here (-it is just not widely distributed yet...). I do not beleive that any browser supports CSS3 yet..

You could 'fake it' now maybe, by nesting a smaller DIV inside of a larger DIV, leaving ample 'margin' all-'round, and using the "background-image" for the DIV beneith. You likely have to make the 'bottom DIV be "relative" and the smaller, overlying DIV be 'absolute' to pull this off. You could give it a relative-over-relative maybe if you used z-index and positoned to occupy the same space, but you'd be messing with that which creates scrollbars and it gets messy.
<!-- next: background div -->

<div style="position:[B]relative[/B]; width:520px; height:520px; border:1px solid black; [B]background-image:url();[/B]">

<div style="position:[B]absolute[/B]; left:12px; top:12px;width:490px; height:490px; border:3px double red;">

<p>This is the 'inside' div</p>

</div>


</div>[/QUOTE]
Copy linkTweet thisAlerts:
@KDLAFeb 13.2007 — That's a CSS3 setting. (Not all browsers will be able to display that styling.)

Reference: http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-border-image

KDLA
Copy linkTweet thisAlerts:
@KDLAFeb 13.2007 — Whoops - didn't see your post there, Joel.

Here's a tutorial to fake a border image style (if Joel's doesn't work for you): http://www.bigbaer.com/css_tutorials/css.border.image.frame.styles.htm

KDLA
×

Success!

Help @Hitori spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...