Css Course


CSS display

With the display property you can specifies if or how an HTML element is displayed in the web page.
- Values: - Syntax:
display: value;
Example (remove a DIV, displays <a> tags as block elements and <li> with inline):
<style>
#idd { display: none; }
.a_block { display: block; }
#idu li { display: inline; }
</style>

<h4>Example CSS display </h4>
<p>In this HTML page a Div is not shown, displays A tags as block elements and LI with inline.</p>

<div id='idd'>Removed content.</div>
<a href='//coursesweb.net/css' title='CSS course' class='a_block'>CSS course</a> <a href='//coursesweb.net/html' title='HTML course' class='a_block'>HTML course</a>
<ul id='idu'>
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>

CSS visibility

The visibility property can control if an element is visible or not. Even if the element is hidden, still affects layout and will take up space on the web page, where it should to be displayed.

- Values: - Syntax:
visibility: value;
Example (make a <span> invisible):
<style>
 #idd span { visibility: hidden; }
</style>

<h4>Example CSS visibility</h4>
<div id='idd'>This row contains a text <span>in a SPAN tag</span> that is hidden but still takes up space.</div>

CSS clip - Define the visible portion of an element

Defining the visible surface of an element determines its visible portion. The remaining contents of that element does not disappear, but is invisible to the visitor.
The element must have set position:absolute, then, to define the visible region it's used the clip property with rect value that sets the shape of the visible region.
- Values: - Syntax:
clip: value;
Example:
<style>
#idd {
position: absolute;
clip: rect(0, 200px, 23px, 60px);
}
</style>

<h4>Example CSS clip</h4>
<div id='idd'>Free CSS: coursesweb.net/css</div>

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);
Display and Visibility

Last accessed pages

  1. The Fifth Agreement (19036)
  2. Rectangle, Oval, Polygon - Star (3305)
  3. CSS3 - text-shadow, word-wrap, text-overflow (1315)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (141002)
  5. SHA1 Encrypt data in JavaScript (35526)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (577)
  2. Read Excel file data in PHP - PhpExcelReader (75)
  3. The Mastery of Love (68)
  4. CSS cursor property - Custom Cursors (58)
  5. The School for Gods (56)