Sharp corners on top
:
Code:
[HTML]
<title> Sharp Corner div</title>
<style type= "Text/css" >
#top
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
top:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
left:40px; /* It to determine the position of the sharp corner */
border-top:0px;
BORDER-BOTTOM:6PX solid black; /* Notice the change in color */
BORDER-RIGHT:6PX solid white;
BORDER-LEFT:6PX solid white;
}
. SP2
{
top:6px; /* is twice times the width of its own border */
left:-3px; /* is the width of its own border-1 time times */
border-top:0px;
border-bottom:3px solid white;
BORDER-RIGHT:3PX solid black;
BORDER-LEFT:3PX solid black;
}
</style>
<body>
<div id= "Top" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
<title> Sharp Corner div</title>
<style type= "Text/css" >
#top
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
top:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
left:40px; /* It to determine the position of the sharp corner */
border-top:0px;
BORDER-BOTTOM:6PX solid black; /* Notice the change in color */
BORDER-RIGHT:6PX solid white;
BORDER-LEFT:6PX solid white;
}
. SP2
{
top:6px; /* is twice times the width of its own border */
left:-3px; /* is the width of its own border-1 time times */
border-top:0px;
border-bottom:3px solid white;
BORDER-RIGHT:3PX solid black;
BORDER-LEFT:3PX solid black;
}
</style>
<body>
<div id= "Top" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
The sharp corners are below.
:
Code:
[HTML]
<title> Sharp Corner div</title>
<style type= "Text/css" >
#bottom
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
bottom:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
left:40px; /* It to determine the position of the sharp corner */
border-bottom:0px;
BORDER-TOP:6PX solid black; /* Notice the change in color */
BORDER-RIGHT:6PX solid white;
BORDER-LEFT:6PX solid white;
}
. SP2
{
bottom:6px; /* is twice times the width of its own border */
left:-3px; /* is the width of its own border-1 time times */
border-bottom:0px;
border-top:3px solid white;
BORDER-RIGHT:3PX solid black;
BORDER-LEFT:3PX solid black;
}
</style>
<body>
<div id= "Bottom" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
<title> Sharp Corner div</title>
<style type= "Text/css" >
#bottom
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
bottom:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
left:40px; /* It to determine the position of the sharp corner */
border-bottom:0px;
BORDER-TOP:6PX solid black; /* Notice the change in color */
BORDER-RIGHT:6PX solid white;
BORDER-LEFT:6PX solid white;
}
. SP2
{
bottom:6px; /* is twice times the width of its own border */
left:-3px; /* is the width of its own border-1 time times */
border-bottom:0px;
border-top:3px solid white;
BORDER-RIGHT:3PX solid black;
BORDER-LEFT:3PX solid black;
}
</style>
<body>
<div id= "Bottom" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
Sharp Corner on the left
:
Code:
[HTML]
<title> Sharp Corner div</title>
<style type= "Text/css" >
#left
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
left:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
top:40px; /* It to determine the position of the sharp corner */
border-left:0px;
BORDER-TOP:6PX solid white; /* Notice the change in color */
BORDER-RIGHT:6PX solid black;
BORDER-BOTTOM:6PX solid white;
}
. SP2
{
left:6px; /* is twice times the width of its own border */
top:-3px; /* is the width of its own border-1 time times */
border-left:0px;
BORDER-TOP:3PX solid black;
border-right:3px solid white;
BORDER-BOTTOM:3PX solid black;
}
</style>
<body>
<div id= "Left" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
<title> Sharp Corner div</title>
<style type= "Text/css" >
#left
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
left:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
top:40px; /* It to determine the position of the sharp corner */
border-left:0px;
BORDER-TOP:6PX solid white; /* Notice the change in color */
BORDER-RIGHT:6PX solid black;
BORDER-BOTTOM:6PX solid white;
}
. SP2
{
left:6px; /* is twice times the width of its own border */
top:-3px; /* is the width of its own border-1 time times */
border-left:0px;
BORDER-TOP:3PX solid black;
border-right:3px solid white;
BORDER-BOTTOM:3PX solid black;
}
</style>
<body>
<div id= "Left" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
Sharp Corner on the right
:
Code:
[HTML]
<title> Sharp Corner div</title>
<style type= "Text/css" >
#right
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
right:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
top:40px; /* It to determine the position of the sharp corner */
border-right:0px;
BORDER-TOP:6PX solid white; /* Notice the change in color */
BORDER-BOTTOM:6PX solid white;
BORDER-LEFT:6PX solid black;
}
. SP2
{
right:6px; /* is twice times the width of its own border */
top:-3px; /* is the width of its own border-1 time times */
border-right:0px;
BORDER-TOP:3PX solid black;
BORDER-BOTTOM:3PX solid black;
border-left:3px solid white;
}
</style>
<body>
<div id= "Right" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
<title> Sharp Corner div</title>
<style type= "Text/css" >
#right
{
width:400px;
height:250px;
BORDER:3PX solid; /* Border Width is 3px */
position:relative;
}
. sp1,.sp2
{
Display:block;
height:0px;
width:0px;
Position:absolute;
font-size:0;
line-height:0;
}
. SP1
{
right:-9px; /* Its absolute value plus span border width is equal to 5 times times the width of the div border */
top:40px; /* It to determine the position of the sharp corner */
border-right:0px;
BORDER-TOP:6PX solid white; /* Notice the change in color */
BORDER-BOTTOM:6PX solid white;
BORDER-LEFT:6PX solid black;
}
. SP2
{
right:6px; /* is twice times the width of its own border */
top:-3px; /* is the width of its own border-1 time times */
border-right:0px;
BORDER-TOP:3PX solid black;
BORDER-BOTTOM:3PX solid black;
border-left:3px solid white;
}
</style>
<body>
<div id= "Right" >
<span class= "SP1" >
<span class= "SP2" ></span>
</span>
</div>
</body>
Finish