Rhombus shape with DIV tag and CSS properties. The Rhombus shape is created by borders.
Code:
<style type="text/css">
#rhombus {
position: relative;
top: -60px;
width: 0;
height: 0;
border: 60px solid transparent;
border-bottom: 75px solid #05ed08;
}
/* Bottom area */
#rhombus:after {
position: absolute;
left: -60px;
top: 75px;
width: 0;
height: 0;
border: 60px solid transparent;
border-top: 75px solid #05ed08;
content: '';
}
/* Content in rhombus */
#rhombus div {
position: relative;
margin: 63px auto 0 -41px;
font-weight: bold;
z-index: 888;
}
</style>
<div id="rhombus"><div>CoursesWeb</div></div>
Demo:
Daily Test with Code Example
HTML
CSS
JavaScript
PHP-MySQL
Which tag is used in <table> to create table header cell?
<thead> <th> <td><table><tr>
<th>Title 1</th>
<th>Title 2</th>
</tr></table>
Which CSS property sets the distance between lines?
line-height word-spacing margin.some_class {
line-height: 150%;
}
Which function opens a new browser window.
alert() confirm() open()document.getElementById("id_button").onclick = function(){
window.open("http://coursesweb.net/");
}
Indicate the PHP function that returns an array with names of the files and folders inside a directory.
mkdir() scandir() readdir()$ar_dir = scandir("dir_name");
var_export($ar_dir);