Circle and Oval shapes created with a single HTML DIV tag and a few CSS properties.

Circle

<style type="text/css">
#circle {
 width: 180px;
 height: 180px;
 background: #abcdef;
 -moz-border-radius: 50%;
 -webkit-border-radius: 50%;
 border-radius: 50%;
 padding:15px;
}
</style>

<div id="circle"><br/><br/>Web Programming Courses:<br/>CoursesWeb.net</div>
Demo:


Web Programming Courses:
CoursesWeb.net

Oval shape

- Radius must be half of length and width, to which is added the padding value (in this example: (240 / 2) + 15 = 135, and (120 / 2) + 15 = 75).
<style type="text/css">
#oval {
 width: 240px;
 height: 120px;
 background: #89f899;
 -moz-border-radius: 135px / 75px;
 -webkit-border-radius: 135px / 75px;
 border-radius: 135px / 75px;padding:15px;
}
</style>

<div id="oval"><br/>Courses for Web Development:<br/>http://CoursesWeb.net</div>
Demo:

Courses for Web Development:
http://CoursesWeb.net

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which meta tag provides a short description of the page?
<meta content="..."> <meta description="..."> <meta http-equiv="...">
<meta name="description" content="70-160 characters that describes the content of the page" />
Which CSS property is used to stop the wrapping effect of the "float"?
clear text-align position
#some_id {
  clear: both;
}
Click on the method which gets an array with all the elements in the document that have a specified tag name.
getElementsByName() getElementById() getElementsByTagName()
var divs = document.getElementsByTagName("div");
var nr_divs = divs.length;
alert(nr_divs);
Indicate the PHP function which returns the number of elements in array.
is_array() count() strlen()
$arr = array(7, 8, "abc", 10);
$nri = count($arr);
echo $nri;        // 4
Circle and Oval with CSS

Last accessed pages

  1. Qwop (55291)
  2. Sport Games (9839)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (39056)
  4. Bloons Tower Defense 4 (2279)
  5. PHP PDO - Select query, fetch (17600)

Popular pages this month

  1. Qwop (10209)
  2. Drag Racer V3 (6100)
  3. Flash Games - Free online Games (2084)
  4. List with All the Games (2030)
  5. Bubbles3 (1892)