/    Sign up×
Community /Pin to ProfileBookmark

Extending a border

Is it possible to extend a border so it goes out a little farther than the element?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@cootheadNov 01.2007 — Hi there mizas,
[color=navy]Is it possible to extend a border so it goes out a little farther than the element?[/color][/quote]
No, you will have to resort to trickery ?
[color=navy]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
#outer {
width:100px;
padding:0 5px;
border-top:1px solid #000;
margin:20px auto;
}
#inner {
height:100px;
background-color:#fcc;
}
</style>

</head>
<body>

<div id="outer">
<div id="inner"></div>
</div>

</body>
</html>[/color]

[i]coothead[/i]
Copy linkTweet thisAlerts:
@WebJoelNov 01.2007 — Or a single-DIV solution is to use existing borders on the sole element:
<div style="width:200px; border-top:10px solid black; border-left:20px solid white; border-right:20px solid white; padding:5px; margin:20px; background-color: pink;">

<p>content goes here</p>

</div>[/QUOTE]
Caveat is that if the border-top is more than 1px, you start to get 'picture frame edges' effect.. But maybe this is something you would want(??). ?
×

Success!

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