/    Sign up×
Community /Pin to ProfileBookmark

Is possible to add border-top also image?

Is possible to add border-top also image or there is no chance to replace normal:border-top : 1px solid #cccccc;

Will work image in all browsers?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@sticks464Nov 29.2008 — Put your image in a container and give it top padding. Set the background of the container with the image you want as a border.
[CODE]html
<div class="box">
<img src="myimage.jpg" alt="my image">
</div>

css
div {
width:150px; /*same as image width */
height:150px;/* same as image height */
background:red ; /*replace color with url(pathtoimage.jpg); */
}
div img {
width:150px;
height:150px;
padding-top:10px; /* increase/decrease for top border */
}[/CODE]
Copy linkTweet thisAlerts:
@TaboNov 29.2008 — If you mean you want a border image, this is part of the CSS 3 specification and therefore can't be used yet.

However I do think that webkit and gecko have or have done in a nightly build added support for this using the prefix -webkit- and -moz-

http://www.css3.info/preview/border-image/
×

Success!

Help @toplisek 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.20,
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,
)...